4.1.3.18. TextureVertexArray

This modules provides to tools to manage texture.

class PyOpenGLng.HighLevelApi.TextureVertexArray.GlTextureVertexArray(position, dimension, image=None, integer_internal_format=False)[source]

Bases: PyOpenGLng.HighLevelApi.VertexArrayObject.GlVertexArrayObject

This class wraps a Texture Vertex Array.

The parameters position and dimension define the quad where is mapped the texture.

_bind_texture()[source]

Bind the texture.

_create_array(position, dimension)[source]

Create the vertex array buffer for the quad from a rectangle defined by its base position and its dimension.

_create_texture()[source]

Create the texture.

_create_uv_vbo()[source]

Create the vertex array buffer for the UV texture coordinates.

_logger = <logging.Logger object at 0x5d06f10>
_unbind_texture()[source]

Unbind the texture.

_uv_vbo = None
bind_to_shader(shader_program_interface)[source]

Bind to a shader program.

The shader program must define a position vertex attribute for the quad where is mapped the texture, a position_uv vertex attribute for the UV texture coordinates and a texture0 sampler uniform.

draw()[source]

Map and paint the texture on the quad defined by the vertex array.

set(image, integer_internal_format=False)[source]

Set the texture data.

The parameter image is a Numpy array that can have up to 4 interleaved planes and of type uint8, int8, uint16 and int16.

The flag integer_internal_format specfies if the texture uses an integer internal format.

Previous topic

4.1.3.17. TextureFont

Next topic

4.1.3.19. Transforms

This Page