![]() |
WhirlyGlobe
1.2
A 3D interactive globe toolkit for iOS
|
#include <Texture.h>
Public Member Functions | |
Texture () | |
Construct emty. | |
Texture (NSData *texData, bool isPVRTC) | |
Construct with raw texture data. PVRTC is preferred. | |
Texture (NSString *baseName, NSString *ext) | |
Construct with a file name and extension. | |
Texture (UIImage *inImage) | |
Construct with a UIImage. Expecting this to be a power of 2 on each side. | |
GLuint | getGLId () const |
bool | createInGL (bool releaseData=true) |
Render side only. Don't call this. Create the openGL version. | |
void | destroyInGL () |
Render side only. Don't call this. Destroy the openGL version. | |
void | setWidth (unsigned int newWidth) |
Set the texture width. | |
void | setHeight (unsigned int newHeight) |
Set the texture height. | |
void | setUsesMipmaps (bool use) |
Set this to have a mipmap generated and used for minification. | |
Protected Attributes | |
NSData * | texData |
Raw texture data. | |
bool | isPVRTC |
Need to know how we're going to load it. | |
unsigned int | width |
unsigned int | height |
bool | usesMipmaps |
GLuint | glId |
Your basic Texture representation. This is how you get an image sent over to the rendering engine. Set up one of these and add it. If you want to remove it, you need to use its Identifiable ID.
GLuint WhirlyGlobe::Texture::glId [protected] |
OpenGL ES ID Set to 0 if we haven't loaded yet