TextureCube is a collection of six separate square textures that are put onto the faces of an imaginary cube. More...
Inherits Texture2D.
Public Member Functions | |
| void | setTexParameters (const TexParams &) |
| Sets the min filter, mag filter, wrap s and wrap t texture parameters. More... | |
| bool | reloadTexture () |
| reload texture cube after GLESContext reconstructed. More... | |
| local | reloadTexture () |
| reload texture cube after GLESContext reconstructed. More... | |
Public Member Functions inherited from Texture2D | |
| virtual std::string | getDescription () const |
| Get texutre name, dimensions and coordinates message by a string. | |
| void | releaseGLTexture () |
| Release only the gl texture. | |
| bool | initWithData (const void *data, ssize_t dataLen, Texture2D::PixelFormat pixelFormat, int pixelsWide, int pixelsHigh, const Size &contentSize) |
| Initializes with a texture2d with data. More... | |
| bool | initWithMipmaps (MipmapInfo *mipmaps, int mipmapsNum, Texture2D::PixelFormat pixelFormat, int pixelsWide, int pixelsHigh) |
| Initializes with mipmaps. More... | |
| bool | updateWithData (const void *data, int offsetX, int offsetY, int width, int height) |
| Update with texture data. More... | |
| void | drawAtPoint (const Vec2 &point) |
| Drawing extensions to make it easy to draw basic quads using a Texture2D object. More... | |
| var | drawAtPoint ( var point) |
| Drawing extensions to make it easy to draw basic quads using a Texture2D object. More... | |
| local | drawAtPoint ( local point) |
| Drawing extensions to make it easy to draw basic quads using a Texture2D object. More... | |
| void | drawInRect (const Rect &rect) |
| Draws a texture inside a rect. More... | |
| bool | initWithImage (Image *image) |
| Extensions to make it easy to create a Texture2D object from an image file. More... | |
| bool | initWithImage (Image *image, PixelFormat format) |
| Initializes a texture from a UIImage object. More... | |
| bool | initWithString (const char *text, const std::string &fontName, float fontSize, const Size &dimensions=Size(0, 0), TextHAlignment hAlignment=TextHAlignment::CENTER, TextVAlignment vAlignment=TextVAlignment::TOP) |
| Initializes a texture from a string with dimensions, alignment, font name and font size. More... | |
| local | initWithString ( local text, local fontName, local fontSize, local 0, local CENTER, local TOP) |
| Initializes a texture from a string with dimensions, alignment, font name and font size. More... | |
| bool | initWithString (const char *text, const FontDefinition &textDefinition) |
| Initializes a texture from a string using a text definition. More... | |
| local | initWithString ( local text, local textDefinition) |
| Initializes a texture from a string using a text definition. More... | |
| void | setTexParameters (const TexParams &texParams) |
| Sets the min filter, mag filter, wrap s and wrap t texture parameters. More... | |
| void | setAntiAliasTexParameters () |
| Sets antialias texture parameters: More... | |
| var | setAntiAliasTexParameters () |
| Sets antialias texture parameters: More... | |
| local | setAntiAliasTexParameters () |
| Sets antialias texture parameters: More... | |
| void | setAliasTexParameters () |
| Sets alias texture parameters: More... | |
| void | generateMipmap () |
| Generates mipmap images for the texture. More... | |
| const char * | getStringForFormat () const |
| Returns the pixel format. More... | |
| local | getStringForFormat () |
| Returns the pixel format. More... | |
| unsigned int | getBitsPerPixelForFormat () const |
| Returns the bits-per-pixel of the in-memory OpenGL texture. More... | |
| unsigned int | getBitsPerPixelForFormat (Texture2D::PixelFormat format) const |
| Helper functions that returns bits per pixels for a given format. More... | |
| var | getBitsPerPixelForFormat ( var format) |
| Helper functions that returns bits per pixels for a given format. More... | |
| local | getBitsPerPixelForFormat ( local format) |
| Helper functions that returns bits per pixels for a given format. More... | |
| const Size & | getContentSizeInPixels () |
| Get content size. More... | |
| local | getContentSizeInPixels () |
| Get content size. More... | |
| bool | hasPremultipliedAlpha () const |
| Whether or not the texture has their Alpha premultiplied. More... | |
| var | hasPremultipliedAlpha () |
| Whether or not the texture has their Alpha premultiplied. More... | |
| local | hasPremultipliedAlpha () |
| Whether or not the texture has their Alpha premultiplied. More... | |
| bool | hasMipmaps () const |
| Whether or not the texture has mip maps. More... | |
| var | hasMipmaps () |
| Whether or not the texture has mip maps. More... | |
| local | hasMipmaps () |
| Whether or not the texture has mip maps. More... | |
| Texture2D::PixelFormat | getPixelFormat () const |
| Gets the pixel format of the texture. More... | |
| local | getPixelFormat () |
| Gets the pixel format of the texture. More... | |
| int | getPixelsWide () const |
| Gets the width of the texture in pixels. More... | |
| var | getPixelsWide () |
| Gets the width of the texture in pixels. More... | |
| local | getPixelsWide () |
| Gets the width of the texture in pixels. More... | |
| int | getPixelsHigh () const |
| Gets the height of the texture in pixels. More... | |
| var | getPixelsHigh () |
| Gets the height of the texture in pixels. More... | |
| local | getPixelsHigh () |
| Gets the height of the texture in pixels. More... | |
| GLuint | getName () const |
| Gets the texture name. More... | |
| local | getName () |
| Gets the texture name. More... | |
| GLfloat | getMaxS () const |
| Gets max S. More... | |
| void | setMaxS (GLfloat maxS) |
| Sets max S. More... | |
| GLfloat | getMaxT () const |
| Gets max T. More... | |
| var | getMaxT () |
| Gets max T. More... | |
| local | getMaxT () |
| Gets max T. More... | |
| void | setMaxT (GLfloat maxT) |
| Sets max T. More... | |
| Size | getContentSize () const |
| Get the texture content size. More... | |
| var | getContentSize () |
| Get the texture content size. More... | |
| local | getContentSize () |
| Get the texture content size. More... | |
| void | setGLProgram (GLProgram *program) |
| Set a shader program to the texture. More... | |
| var | setGLProgram ( var program) |
| Set a shader program to the texture. More... | |
| local | setGLProgram ( local program) |
| Set a shader program to the texture. More... | |
| GLProgram * | getGLProgram () const |
| Get a shader program from the texture. More... | |
| var | getGLProgram () |
| Get a shader program from the texture. More... | |
| local | getGLProgram () |
| Get a shader program from the texture. More... | |
Public Member Functions inherited from Ref | |
| void | retain () |
| Retains the ownership. More... | |
| void | release () |
| Releases the ownership immediately. More... | |
| Ref * | autorelease () |
| Releases the ownership sometime soon automatically. More... | |
| unsigned int | getReferenceCount () const |
| Returns the Ref's current reference count. More... | |
| virtual | ~Ref () |
| Destructor. More... | |
Static Public Member Functions | |
| static TextureCube * | create (const std::string &positive_x, const std::string &negative_x, const std::string &positive_y, const std::string &negative_y, const std::string &positive_z, const std::string &negative_z) |
| create cube texture from 6 textures. More... | |
Static Public Member Functions inherited from Texture2D | |
| static void | setDefaultAlphaPixelFormat (Texture2D::PixelFormat format) |
| sets the default pixel format for UIImagescontains alpha channel. More... | |
| var | setDefaultAlphaPixelFormat ( var format) |
| sets the default pixel format for UIImagescontains alpha channel. More... | |
| local | setDefaultAlphaPixelFormat ( local format) |
| sets the default pixel format for UIImagescontains alpha channel. More... | |
| static Texture2D::PixelFormat | getDefaultAlphaPixelFormat () |
| Returns the alpha pixel format. More... | |
| static void | PVRImagesHavePremultipliedAlpha (bool haveAlphaPremultiplied) |
| Treats (or not) PVR files as if they have alpha premultiplied. More... | |
| local | PVRImagesHavePremultipliedAlpha ( local haveAlphaPremultiplied) |
| Treats (or not) PVR files as if they have alpha premultiplied. More... | |
| static const PixelFormatInfoMap & | getPixelFormatInfoMap () |
| Get pixel info map, the key-value pairs is PixelFormat and PixelFormatInfo. More... | |
| local | getPixelFormatInfoMap () |
| Get pixel info map, the key-value pairs is PixelFormat and PixelFormatInfo. More... | |
Protected Member Functions | |
| TextureCube () | |
| Constructor. | |
| virtual | ~TextureCube () |
| Destructor. | |
| local | ~TextureCube () |
| Destructor. | |
Additional Inherited Members | |
Public Types inherited from Texture2D | |
| enum | PixelFormat { AUTO, BGRA8888, RGBA8888, RGB888, RGB565, A8, I8, AI88, RGBA4444, RGB5A1, PVRTC4, PVRTC4A, PVRTC2, PVRTC2A, ETC, S3TC_DXT1, S3TC_DXT3, S3TC_DXT5, ATC_RGB, ATC_EXPLICIT_ALPHA, ATC_INTERPOLATED_ALPHA, DEFAULT = AUTO } |
| Possible texture pixel formats. More... | |
Public Attributes inherited from Ref | |
| unsigned int | _ID |
| object id, ScriptSupport need public _ID | |
| int | _luaID |
| Lua reference id. | |
| void * | _scriptObject |
| scriptObject, support for swift | |
TextureCube is a collection of six separate square textures that are put onto the faces of an imaginary cube.
|
static |
create cube texture from 6 textures.
| positive_x | texture for the right side of the texture cube face. |
| negative_x | texture for the up side of the texture cube face. |
| positive_y | texture for the top side of the texture cube face |
| negative_y | texture for the bottom side of the texture cube face |
| positive_z | texture for the forward side of the texture cube face. |
| negative_z | texture for the rear side of the texture cube face. |
|
static |
create cube texture from 6 textures.
| positive_x | texture for the right side of the texture cube face. |
| negative_x | texture for the up side of the texture cube face. |
| positive_y | texture for the top side of the texture cube face |
| negative_y | texture for the bottom side of the texture cube face |
| positive_z | texture for the forward side of the texture cube face. |
| negative_z | texture for the rear side of the texture cube face. |
|
static |
create cube texture from 6 textures.
| positive_x | texture for the right side of the texture cube face. |
| negative_x | texture for the up side of the texture cube face. |
| positive_y | texture for the top side of the texture cube face |
| negative_y | texture for the bottom side of the texture cube face |
| positive_z | texture for the forward side of the texture cube face. |
| negative_z | texture for the rear side of the texture cube face. |
| void setTexParameters | ( | const TexParams & | ) |
Sets the min filter, mag filter, wrap s and wrap t texture parameters.
If the texture size is NPOT (non power of 2), then in can only use GL_CLAMP_TO_EDGE in GL_TEXTURE_WRAP_{S,T}.
| var setTexParameters | ( | var | ) |
Sets the min filter, mag filter, wrap s and wrap t texture parameters.
If the texture size is NPOT (non power of 2), then in can only use GL_CLAMP_TO_EDGE in GL_TEXTURE_WRAP_{S,T}.
| local setTexParameters | ( | local | ) |
Sets the min filter, mag filter, wrap s and wrap t texture parameters.
If the texture size is NPOT (non power of 2), then in can only use GL_CLAMP_TO_EDGE in GL_TEXTURE_WRAP_{S,T}.
| bool reloadTexture | ( | ) |
reload texture cube after GLESContext reconstructed.
| var reloadTexture | ( | ) |
reload texture cube after GLESContext reconstructed.
| local reloadTexture | ( | ) |
reload texture cube after GLESContext reconstructed.