Quick search

OpenGL utilities

New in version 1.0.7. list

Return a list of OpenGL extensions available. All the names in the list have the GL_ stripped at the start (if it exists) and are in lowercase.

>>> print(gl_get_extensions())
['arb_blend_func_extended', 'arb_color_buffer_float', 'arb_compatibility',
 'arb_copy_buffer'... ] tuple

Return a list of texture formats recognized by kivy. The texture list is informative but might not been supported by your hardware. If you want a list of supported textures, you must filter that list as follows:

supported_fmts = [gl_has_texture_format(x) for x in gl_get_texture_formats()] tuple

Return the (major, minor) OpenGL version, parsed from the GL_VERSION.

New in version 1.2.0. int

Return the major component of the OpenGL version.

New in version 1.2.0. int

Return the minor component of the OpenGL version.

New in version 1.2.0. cap) int

Return the status of a OpenGL Capability. This is a wrapper that auto-discovers all the capabilities that Kivy might need. The current capabilities tested are:

  • GLCAP_BGRA: Test the support of BGRA texture format

  • GLCAP_NPOT: Test the support of Non Power of Two texture

  • GLCAP_S3TC: Test the support of S3TC texture (DXT1, DXT3, DXT5)

  • GLCAP_DXT1: Test the support of DXT texture (subset of S3TC)

  • GLCAP_ETC1: Test the support of ETC1 texture int

Check if an OpenGL extension is available. If the name starts with GL_, it will be stripped for the test and converted to lowercase.

>>> gl_has_extension('NV_get_tex_image')
>>> gl_has_extension('OES_texture_npot')
True int

Return 1 if the texture can be converted to a native format. int

Return whether a texture format is supported by your system, natively or by conversion. For example, if your card doesn’t support ‘bgra’, we are able to convert to ‘rgba’ but only in software mode. int

Return 1 if the texture format is handled natively.

>>> gl_has_texture_format('azdmok')
>>> gl_has_texture_format('rgba')
>>> gl_has_texture_format('s3tc_dxt1')
[INFO   ] [GL          ] S3TC texture support is available
[INFO   ] [GL          ] DXT1 texture support is available
1 constid, int size)

Register an association between an OpenGL Const used in glGet* to a number of elements.

By example, the GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX is a special pname that will return the integer 1 (nvidia only).

>>> gl_register_get_size(GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX, 1)