, height, target=34067, level=0, internalFormat=6408, pixelFormat=6408, dataType=5121, data=None, unpackAlignment=4, texParams=None)[source]

Create a cubemap.

  • name (int or GLuint) – OpenGL handle for the cube map. Is 0 if uninitialized.

  • target (int) – The target texture should only be GL_TEXTURE_CUBE_MAP.

  • width (int) – Texture width in pixels.

  • height (int) – Texture height in pixels.

  • level (int) – LOD number of the texture.

  • internalFormat (int) – Internal format for texture data (e.g. GL_RGBA8, GL_R11F_G11F_B10F).

  • pixelFormat (int) – Pixel data format (e.g. GL_RGBA, GL_DEPTH_STENCIL)

  • dataType (int) – Data type for pixel data (e.g. GL_FLOAT, GL_UNSIGNED_BYTE).

  • data (list or tuple) – List of six ctypes pointers to image data for each cubemap face. Image data is assigned to a face by index [+X, -X, +Y, -Y, +Z, -Z]. All images must have the same size as specified by width and height.

  • unpackAlignment (int) – Alignment requirements of each row in memory. Default is 4.

  • texParams (list of tuple of int) – Optional texture parameters specified as dict. These values are passed to glTexParameteri. Each tuple must contain a parameter name and value. For example, texParameters={ GL.GL_TEXTURE_MIN_FILTER: GL.GL_LINEAR, GL.GL_TEXTURE_MAG_FILTER: GL.GL_LINEAR}. These can be changed and will be updated the next time this instance is passed to bindTexture().

Back to top