picogl.backend.gl.wrappers.texture

OpenGL texture upload wrappers (2D and 3D).

Functions

gl_active_texture(→ None)

Issue glActiveTexture.

gl_get_active_texture0(→ None)

Select texture unit 0.

gl_gen_textures(→ Any)

Issue glGenTextures.

gl_bind_texture(→ None)

Issue glBindTexture.

gl_compressed_tex_image(→ None)

Issue glCompressedTexImage2D for a 2D texture.

gl_teximage2d(→ None)

Issue glTexImage2D.

gl_teximage3d(→ None)

Issue glTexImage3D.

gl_tex_parameter(→ None)

Issue glTexParameteri.

gl_generate_mipmap(→ None)

Generate mipmaps for the currently bound texture.

Module Contents

picogl.backend.gl.wrappers.texture.gl_active_texture(unit: int) None[source]

Issue glActiveTexture.

picogl.backend.gl.wrappers.texture.gl_get_active_texture0() None[source]

Select texture unit 0.

picogl.backend.gl.wrappers.texture.gl_gen_textures(number: int = 1) Any[source]

Issue glGenTextures.

picogl.backend.gl.wrappers.texture.gl_bind_texture(tex_id: int, target: int = GL_TEXTURE_2D) None[source]

Issue glBindTexture.

picogl.backend.gl.wrappers.texture.gl_compressed_tex_image(byte_array: array.array[int], gl_format: OpenGL.constant.FloatConstant | OpenGL.constant.IntConstant | OpenGL.constant.LongConstant | OpenGL.constant.StringConstant | OpenGL.constant.Constant, h: int, level: int, size: int, w: int) None[source]

Issue glCompressedTexImage2D for a 2D texture.

picogl.backend.gl.wrappers.texture.gl_teximage2d(target: int, level: int, internalformat: OpenGL.constant.FloatConstant | OpenGL.constant.IntConstant | OpenGL.constant.LongConstant | OpenGL.constant.StringConstant | OpenGL.constant.Constant, width: int, height: int, border: int, format: OpenGL.constant.FloatConstant | OpenGL.constant.IntConstant | OpenGL.constant.LongConstant | OpenGL.constant.StringConstant | OpenGL.constant.Constant, num_type: int = GLNumeric.UNSIGNED_BYTE, data: bytes | numpy.ndarray | None = None) None[source]

Issue glTexImage2D.

picogl.backend.gl.wrappers.texture.gl_teximage3d(target: int, level: int, internalformat: OpenGL.constant.FloatConstant | OpenGL.constant.IntConstant | OpenGL.constant.LongConstant | OpenGL.constant.StringConstant | OpenGL.constant.Constant, width: int, height: int, depth: int, border: int, format: OpenGL.constant.FloatConstant | OpenGL.constant.IntConstant | OpenGL.constant.LongConstant | OpenGL.constant.StringConstant | OpenGL.constant.Constant, num_type: int, data: bytes | numpy.ndarray | None = None) None[source]

Issue glTexImage3D.

picogl.backend.gl.wrappers.texture.gl_tex_parameter(target: int, pname: Any, param: Any) None[source]

Issue glTexParameteri.

picogl.backend.gl.wrappers.texture.gl_generate_mipmap(target: int = GL_TEXTURE_2D) None[source]

Generate mipmaps for the currently bound texture.