1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
'''OpenGL extension MESA.framebuffer_swap_xy
This module customises the behaviour of the
OpenGL.raw.GL.MESA.framebuffer_swap_xy to provide a more
Python-friendly API
Overview (from the spec)
This extension defines a new framebuffer parameter,
GL_FRAMEBUFFER_SWAP_XY_MESA, that changes the behavior of the reads and
writes to the framebuffer attachment points. When
GL_FRAMEBUFFER_SWAP_XY_MESA is GL_TRUE, render commands and pixel transfer
operations access the backing store of each attachment point with an
xy-swapped coordinate system. This xy-inversion is relative to the
coordinate system set when GL_FRAMEBUFFER_SWAP_XY_MESA is GL_FALSE.
Access through TexSubImage2D and similar calls will notice the effect of
the swap when they are not attached to framebuffer objects because
GL_FRAMEBUFFER_SWAP_XY_MESA is associated with the framebuffer object and
not the attachment points.
The application should notice the display width and height are also swapped
when GL_FRAMEBUFFER_SWAP_XY_MESA is GL_TRUE.
This extension is mainly for pre-rotation and recommended to use it with
MESA_framebuffer_flip_x and MESA_framebuffer_flip_y to have rotated
result.
The official definition of this extension is available here:
http://www.opengl.org/registry/specs/MESA/framebuffer_swap_xy.txt
'''
from OpenGL import platform, constant, arrays
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GL import _types, _glgets
from OpenGL.raw.GL.MESA.framebuffer_swap_xy import *
from OpenGL.raw.GL.MESA.framebuffer_swap_xy import _EXTENSION_NAME
def glInitFramebufferSwapXyMESA():
'''Return boolean indicating whether this extension is available'''
from OpenGL import extensions
return extensions.hasGLExtension( _EXTENSION_NAME )
### END AUTOGENERATED SECTION
|