kitao / pyxel

A retro game engine for Python
MIT License
15.31k stars 847 forks source link

Pyxel not running #514

Closed whmsft closed 10 months ago

whmsft commented 10 months ago

Running anything, even pyxel run 01_hello_pyxel.py triggers this error:

thread '<unnamed>' panicked at D:\a\pyxel\pyxel\crates\pyxel-engine\src\graphics.rs:53:13:
ERROR: 0:1: '' :  Version number not supported by OGL driver

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Traceback (most recent call last):
  File "E:\Programming\Python\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "E:\Programming\Python\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "E:\Programming\Python\Scripts\pyxel.exe\__main__.py", line 7, in <module>
  File "E:\Programming\Python\lib\site-packages\pyxel\cli.py", line 53, in cli
    command[1](*sys.argv[2:])
  File "E:\Programming\Python\lib\site-packages\pyxel\cli.py", line 167, in run_python_script
    runpy.run_path(python_script_file, run_name="__main__")
  File "E:\Programming\Python\lib\runpy.py", line 265, in run_path
    return _run_module_code(code, init_globals, run_name,
  File "E:\Programming\Python\lib\runpy.py", line 97, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "E:\Programming\Python\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "01_hello_pyxel.py", line 20, in <module>
    App()
  File "01_hello_pyxel.py", line 6, in __init__
    pyxel.init(160, 120, title="Hello Pyxel")
pyo3_runtime.PanicException: ERROR: 0:1: '' :  Version number not supported by OGL driver

As far as I can "guess", my OpenGL 2.1 is the problem (probably, OGL=OpenGL, ain't it?)

PS Why isn't there a "issue template" for raising issues, I expected some good quality "what happened; how to reproduce; system info; etc; etc" template for raising issues...

kitao commented 10 months ago

Let me know what kind of OS and which version of Pyxel you are using. Anyway it seems that your environment is too old to support Pyxel's requirement for OpenGL.

kitao commented 10 months ago

Please try Pyxel 2.0.6. I modified OpenGL/GLES-related code.

whmsft commented 10 months ago

Umm...

thread '<unnamed>' panicked at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\glow-0.13.1\src\gl46.rs:4571:5:
called glGenVertexArrays but it was not loaded.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Traceback (most recent call last):
  File "E:\Programming\Python\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "E:\Programming\Python\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "E:\Programming\Python\Scripts\pyxel.exe\__main__.py", line 7, in <module>
  File "E:\Programming\Python\lib\site-packages\pyxel\cli.py", line 53, in cli
    command[1](*sys.argv[2:])
  File "E:\Programming\Python\lib\site-packages\pyxel\cli.py", line 167, in run_python_script
    runpy.run_path(python_script_file, run_name="__main__")
  File "E:\Programming\Python\lib\runpy.py", line 265, in run_path
    return _run_module_code(code, init_globals, run_name,
  File "E:\Programming\Python\lib\runpy.py", line 97, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "E:\Programming\Python\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "01_hello_pyxel.py", line 20, in <module>
    App()
  File "01_hello_pyxel.py", line 6, in __init__
    pyxel.init(160, 120, title="Hello Pyxel")
pyo3_runtime.PanicException: called glGenVertexArrays but it was not loaded.

I still think, you can close this issue, if and only if you still think the problem must be my graphics card

kitao commented 10 months ago

Without the information of your environment, I can't reproduce the situation and can't think about the cause of it. So I'll close this issue.