1'''OpenGL extension EXT.cmyka
2
3This module customises the behaviour of the
4OpenGL.raw.GL.EXT.cmyka to provide a more
5Python-friendly API
6
7Overview (from the spec)
8
9	This extension provides a simple method for OpenGL to read and store
10	images whose pixels have CMYK or CMYKA formats.  The algorithms used to
11	convert to RGBA from CMYKA and to convert back from RGBA to CMYKA are of
12	the "black-box" nature, meaning that the application has little control
13	over how the conversion is done.  Also, this black-box mechanism is
14	available only for transfers to or from memory, not for internal copies
15	of pixel data (such as invoked by CopyPixels, CopyTexImage1D, etc.)
16	However, the defined mechanism nicely handles 5-component CMYKA images,
17	and it is very easy to use.
18
19	A more configurable and potentially higher quality color conversion can
20	be implemented using the color tables, the color matrix, and possibly 3D
21	and 4D texture lookup.  Such a color conversion also applies to copied
22	pixel data.
23
24The official definition of this extension is available here:
25http://www.opengl.org/registry/specs/EXT/cmyka.txt
26'''
27from OpenGL import platform, constant, arrays
28from OpenGL import extensions, wrapper
29import ctypes
30from OpenGL.raw.GL import _types, _glgets
31from OpenGL.raw.GL.EXT.cmyka import *
32from OpenGL.raw.GL.EXT.cmyka import _EXTENSION_NAME
33
34def glInitCmykaEXT():
35    '''Return boolean indicating whether this extension is available'''
36    from OpenGL import extensions
37    return extensions.hasGLExtension( _EXTENSION_NAME )
38
39
40### END AUTOGENERATED SECTION
41from OpenGL import images as _i
42
43_i.COMPONENT_COUNTS[ GL_CMYK_EXT ] = 4
44_i.COMPONENT_COUNTS[ GL_CMYKA_EXT ] = 5
45