Axmol Engine 2.4.0-258ceca
Loading...
Searching...
No Matches
TextureCube Class Reference

TextureCube is a collection of six separate square textures that are put onto the faces of an imaginary cube. More...

#include <TextureCube.h>

Inherits Object.

Public Member Functions

void setTexParameters (const Texture2D::TexParams &)
 Sets the min filter, mag filter, wrap s and wrap t texture parameters.
 
bool reloadTexture ()
 reload texture cube after GLESContext reconstructed.
 
 TextureCube ()
 Constructor.
 
virtual ~TextureCube ()
 Destructor.
 
- Public Member Functions inherited from Object
void retain ()
 Retains the ownership.
 
void release ()
 Releases the ownership immediately.
 
Objectautorelease ()
 Releases the ownership sometime soon automatically.
 
unsigned int getReferenceCount () const
 Returns the Object's current reference count.
 
virtual ~Object ()
 Destructor.
 

Static Public Member Functions

static TextureCubecreate (std::string_view positive_x, std::string_view negative_x, std::string_view positive_y, std::string_view negative_y, std::string_view positive_z, std::string_view negative_z)
 create cube texture from 6 textures.
 

Additional Inherited Members

- Public Attributes inherited from Object
unsigned int _ID
 object id, ScriptSupport need public _ID
 
int _luaID
 Lua reference id.
 

Detailed Description

TextureCube is a collection of six separate square textures that are put onto the faces of an imaginary cube.

Member Function Documentation

◆ create()

static TextureCube * create ( std::string_view positive_x,
std::string_view negative_x,
std::string_view positive_y,
std::string_view negative_y,
std::string_view positive_z,
std::string_view negative_z )
static

create cube texture from 6 textures.

Parameters
positive_xtexture for the right side of the texture cube face.
negative_xtexture for the up side of the texture cube face.
positive_ytexture for the top side of the texture cube face
negative_ytexture for the bottom side of the texture cube face
positive_ztexture for the forward side of the texture cube face.
negative_ztexture for the rear side of the texture cube face.
Returns
A new texture cube inited with given parameters.

◆ setTexParameters()

void setTexParameters ( const Texture2D::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}.


The documentation for this class was generated from the following file: