112. opengl.texture — Texture rendering.

This module defines tools for texture rendering in pyFormex.

class opengl.texture.Texture(image, mode=1, format=GL_RGBA, texformat=GL_RGBA)[source]

An OpenGL 2D Texture.

Parameters:
  • image (array_like or path_like) – Image data: either raw image data (unsigned byte RGBA data) or the name of an image file with such data.

  • format – Format of the image data.

  • texformat – Format of the texture data.

activate(mode=None, filtr=0)[source]

Render-time texture environment setup