Mercurial > touhou
comparison pytouhou/ui/opengl/backend.pyx @ 611:a6a191e371c7
Add back a GL_QUADS path for legacy applications.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sun, 21 Dec 2014 19:15:59 +0100 |
parents | 1b31169dc344 |
children | 73f134f84c7f |
comparison
equal
deleted
inserted
replaced
610:1b31169dc344 | 611:a6a191e371c7 |
---|---|
7 GL_PERSPECTIVE_CORRECTION_HINT, GL_FOG_HINT, GL_NICEST, | 7 GL_PERSPECTIVE_CORRECTION_HINT, GL_FOG_HINT, GL_NICEST, |
8 GL_COLOR_ARRAY, GL_VERTEX_ARRAY, GL_TEXTURE_COORD_ARRAY, | 8 GL_COLOR_ARRAY, GL_VERTEX_ARRAY, GL_TEXTURE_COORD_ARRAY, |
9 glPushDebugGroup, GL_DEBUG_SOURCE_APPLICATION, glPopDebugGroup, | 9 glPushDebugGroup, GL_DEBUG_SOURCE_APPLICATION, glPopDebugGroup, |
10 epoxy_gl_version, epoxy_is_desktop_gl, epoxy_has_gl_extension, | 10 epoxy_gl_version, epoxy_is_desktop_gl, epoxy_has_gl_extension, |
11 GL_PRIMITIVE_RESTART, glPrimitiveRestartIndex, glPixelStorei, | 11 GL_PRIMITIVE_RESTART, glPrimitiveRestartIndex, glPixelStorei, |
12 GL_PACK_INVERT_MESA, GL_TRIANGLE_STRIP, GL_TRIANGLES) | 12 GL_PACK_INVERT_MESA, GL_QUADS, GL_TRIANGLE_STRIP, GL_TRIANGLES) |
13 | 13 |
14 | 14 |
15 GameRenderer = None | 15 GameRenderer = None |
16 | 16 |
17 | 17 |
63 use_primitive_restart = (is_desktop and version >= 31) | 63 use_primitive_restart = (is_desktop and version >= 31) |
64 use_framebuffer_blit = (is_desktop and version >= 30) | 64 use_framebuffer_blit = (is_desktop and version >= 30) |
65 use_pack_invert = epoxy_has_gl_extension('GL_MESA_pack_invert') | 65 use_pack_invert = epoxy_has_gl_extension('GL_MESA_pack_invert') |
66 use_scaled_rendering = not is_legacy #TODO: try to use the EXT framebuffer extension. | 66 use_scaled_rendering = not is_legacy #TODO: try to use the EXT framebuffer extension. |
67 | 67 |
68 primitive_mode = GL_TRIANGLE_STRIP if use_primitive_restart else GL_TRIANGLES | 68 primitive_mode = (GL_QUADS if is_legacy else |
69 GL_TRIANGLE_STRIP if use_primitive_restart else | |
70 GL_TRIANGLES) | |
69 | 71 |
70 if not is_legacy: | 72 if not is_legacy: |
71 if is_desktop: | 73 if is_desktop: |
72 # gl_FragColor isn’t supported anymore starting with GLSL 4.2. | 74 # gl_FragColor isn’t supported anymore starting with GLSL 4.2. |
73 if version >= 42: | 75 if version >= 42: |