Pythonstuff GLSL in English Pythonstuff GLSL auf Deutsch Pythonstuff GLSL Pythonstuff
PythonStuff Home
 

FAQs for GLSL with pyglet

General Questions

  • Q: What graphics cards are supported ?
  • A: To execute the “OpenGL Shader Language” = GLSL programs, you need a graphics card with support for OpenGL 3.0 or newer. Very often you will only find the “Direct X” version on the package: go for cards with “Direct X 10” or higher support. Card vendors that give serious linux support will usually produce better OpenGL drivers - even for windows.

Performance

  • Q: My CPU Monitor shows 100% all the time - I thought the GPU does all the work ?
  • A: You will get a fps information in the lower right corner by default. This means “how many frames per second can your CPU/GPU calculate”. This gives you a measure of the performance of your program - but hogs the cpu, especially with FAST GPUSs.

Change “vsync = False” to “vsync = True” in the pyglet.window.Window() call to get lower load (but your fps display will never show more than your display refresh rate)

  • Q: I get low frame rates, and my CPU has LOW load
  • A: This means that your output is GPU limited. Maybe a bug in your shader program ? Or, if you have a slow graphics card, try to lower screen resolution, reduce window size or you could try to turn antialiasing off:

# Try and create a window with multisampling (NO antialiasing by “samples=1”)

config = Config(sample_buffers=1, samples=1,
                depth_size=16, double_buffer=True,)
window = pyglet.window.Window(resizable=True, config=config, vsync=True)

Deutschsprachige Version, Start
Impressum & Disclaimer