User Tools

Site Tools


DzTexture

Class that handles sharing of data for image maps.

More...

Inherits :

Inherited By : DzImageTexture and DzLayeredTexture

Enumerations

Methods

Signals

voiddrawnDataChanged ()
voidtempFilenameChanged ( String filename )

Detailed Description

This is a sharable object that stores information for a texture (image map) that is used in OpenGL. Do not create a texture, rather, request one from DzImageMgr - this insures that there is only one instance of a given image in memory at a time, and also ensures that necessary conversions for rendering the image via OpenGL and offline renderers occurs correctly.

Enumerations


: TextureType

TODO: Add description.

  • Standard - TODO: Add description.
  • LatLong - TODO: Add description.
  • LightProbe - TODO: Add description.
  • CustomTexture - TODO: Add description.

Methods


String : getFilename()

Return Value:

  • The source file name for this image.

Number : getGamma()

Return Value:

  • The gamma of the source file for this image. This is used for gamma correction. gamma⇐0 - do best guess of the image gamma gamma==1 - no gamma correction needed gamma>0 != 1 - the image is at the specified gamma

Size : getGLAlphaTextureSize()

Return Value:

  • The actual size of the OpenGL texture alpha image.

Size : getGLTextureSize()

Return Value:

  • The actual size of the OpenGL texture image.

Size : getOriginalImageSize()

Return Value:

  • The size of the original image that was the source of this texture.

Pixmap : getPreviewPixmap( Size size )

Parameter(s):

  • size - size for the pixmap.

Return Value:

  • A pixmap for this texture

Pixmap : getPreviewPixmap( Number width, Number height )

Parameter(s):

  • width - for the pixmap.
  • height - for the pixmap.

Return Value:

  • A pixmap for this texture

String : getTempFilename()

Return Value:

  • The temp file name for this image.

Number : getTextureType()

Return Value:

  • The texture type of this texture

Boolean : loadImageData( Image image )

TODO: Add description.


void : refresh()

Reloads the image if its source file has changed


void : setGamma( Number gamma )

Parameter(s):

  • gamma - the gamma for this image. gamma⇐0 - do best guess of the image gamma, gamma==1 - no gamma correction needed, gamma>0 != 1 - the image is at the specified gamma

void : setTextureType( Number type )

Parameter(s):

  • type - the texture type for this texture

Signals


void : drawnDataChanged()

Signature:“drawnDataChanged()”

Emitted when the data of the texture has changed - e.g. after a call to refresh()


void : tempFilenameChanged( String filename )

Signature:“tempFilenameChanged(const QString&)”

Emitted when the temp filename for the image has changed