sgTexture Class Reference
#include <sgTexture.h>
List of all members.
Detailed Description
Texture class. Stores and handles a texture.
Constructor & Destructor Documentation
Constructor. Initializes without a texture.
sgTexture::~sgTexture |
( |
|
) |
|
Deconstructor. Frees all memory allocated by this class.
Member Function Documentation
void sgTexture::createTexture2D |
( |
float |
width, |
|
|
float |
height | |
|
) |
| | |
Create 2D Texture. If there isn´t already a texture, this function creates a black one with the given dimensions.
- Parameters:
-
| width | the width of the texture to create |
| height | the height of the texture to create |
void sgTexture::createTexture2D |
( |
const char * |
filename, |
|
|
BOOL |
mipmaps = TRUE | |
|
) |
| | |
Create 2D Texture. If there isn´t already a texture, this function loads it from the given file.
- Parameters:
-
| filename | the name of the file to load |
| mipmaps | has to be set to FALSE if you don´t want mipmaps to be created for this texture |
sgTexture * sgTexture::getTexture2D |
( |
const char * |
filename, |
|
|
BOOL |
mipmaps = TRUE | |
|
) |
| | [static] |
Create 2D Texture from PVRTC file. If there isn´t already a texture, this function loads it from a PVRTS compressed file.
- Parameters:
-
| name | the name of the file to load, without the type |
| w | the width of the image can´t be set automatically |
| h | the height of the image can´t be set automatically |
| type | the type of the texture |
| mipmaps | has to be set to FALSE if you don´t want mipmaps to be created for this texture |
- Returns:
- pointer to the texture classes instance Get Texture. Creates and returns a pointer to a texture loaded from the given file.
- Parameters:
-
| filename | the name of the file to load |
| mipmaps | has to be set to FALSE if you don´t want mipmaps to be created for this texture |
- Returns:
- pointer to the texture classes instance
void sgTexture::setParameteri |
( |
unsigned int |
pname, |
|
|
unsigned int |
param | |
|
) |
| | |
Get Texture from PVRTC file. Creates and returns a pointer to a texture loaded from a PVRTS compressed file.
- Parameters:
-
| name | the name of the file to load, without the type |
| w | the width of the image can´t be set automatically |
| h | the height of the image can´t be set automatically |
| mipmaps | has to be set to FALSE if you don´t want mipmaps to be created for this texture |
- Returns:
- pointer to the texture classes instance Set texture parameter int. Sets the specified OpenGL parameter for the texture.
- Parameters:
-
| pname | the parameter to set a new value for |
| param | the new value |
Member Data Documentation
Height. The textures height.
Loaded. TRUE, if this texture is ready to be used.
Texture ID. The OpenGL ID of the texture.
Width. The textures width.
The documentation for this class was generated from the following files:
- iSDGE/Engine/Graphics/sgTexture.h
- iSDGE/Engine/Graphics/sgTexture.mm