osg.Texture2D

class osg.Texture2D
Represents:c++ class
Wraps:osg::Texture2D
Bases:osg.Texture

Encapsulates OpenGL 2D texture functionality. Doesn’t support cube maps, so ignore face parameters.

Constructors:

osg.Texture2D()

osg.Texture2D(osg.Image image)

Параметры:image (osg.Image) –

Methods:

:setNumMipmapLevels(unsigned num)

Helper function. Sets the number of mipmap levels created for this texture. Should only be called within an osg.Texture.apply(), or during a custom OpenGL texture load.

Параметры:num (unsigned) –
:getNumMipmapLevels()

Gets the number of mipmap levels created.

Тип результата:unsigned
:setImage(osg.Image image)

Sets the texture image.

Параметры:image (osg.Image) –
:setImage(int face, osg.Image image)

Sets the texture image, ignoring face.

Параметры:
:getImage()

Gets the texture image.

Тип результата:osg.Image
:getImage(int face)

Gets the texture image, ignoring face.

Параметры:face (int) –
Тип результата:osg.Image
:setTextureSize(int width, int height)

Sets the texture width and height. If width or height are zero, calculate the respective value from the source image size.

Параметры:
  • width (int) –
  • height (int) –
:setTextureWidth(int width)

Параметры:width (int) –
:setTextureHeight(int height)

Параметры:height (int) –