Cocos2d-x  4.0.0
Public Member Functions | List of all members
TextureCubeGL Class Reference

Texture cube. More...

Inherits TextureCubemapBackend.

Public Member Functions

 TextureCubeGL (const TextureDescriptor &descriptor)
 
virtual void updateSamplerDescriptor (const SamplerDescriptor &sampler) override
 Update sampler.
 
virtual void updateFaceData (TextureCubeFace side, void *data) override
 Update texutre cube data in give slice side.
 
virtual void getBytes (std::size_t x, std::size_t y, std::size_t width, std::size_t height, bool flipImage, std::function< void(const unsigned char *, std::size_t, std::size_t)> callback) override
 Read a block of pixels from the drawable texture.
 
virtual void generateMipmaps () override
 Generate mipmaps.
 
virtual void updateTextureDescriptor (const TextureDescriptor &descriptor) override
 Update texture description.
 
GLuint getHandler () const
 Get texture object.
 
void apply (int index) const
 Set texture to pipeline.
 

Additional Inherited Members

- 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
 
bool _rooted
 When true, it means that the object was already rooted.
 

Detailed Description

Texture cube.

Constructor & Destructor Documentation

TextureCubeGL ( const TextureDescriptor descriptor)
Parameters
descirptorSpecifies the texture description.

Member Function Documentation

virtual void updateSamplerDescriptor ( const SamplerDescriptor &  sampler)
overridevirtual

Update sampler.

Parameters
samplerSpecifies the sampler descriptor.

Implements TextureBackend.

virtual void updateFaceData ( TextureCubeFace  side,
void *  data 
)
overridevirtual

Update texutre cube data in give slice side.

Parameters
sideSpecifies which slice texture of cube to be update.
dataSpecifies a pointer to the image data in memory.

Implements TextureCubemapBackend.

virtual void getBytes ( std::size_t  x,
std::size_t  y,
std::size_t  width,
std::size_t  height,
bool  flipImage,
std::function< void(const unsigned char *, std::size_t, std::size_t)>  callback 
)
overridevirtual

Read a block of pixels from the drawable texture.

Parameters
x,ySpecify the window coordinates of the first pixel that is read from the drawable texture. This location is the lower left corner of a rectangular block of pixels.
width,heightSpecify the dimensions of the pixel rectangle. width and height of one correspond to a single pixel.
flipImageSpecifies if needs to flip the image.
callback

Implements TextureBackend.

virtual void updateTextureDescriptor ( const TextureDescriptor descriptor)
overridevirtual

Update texture description.

Parameters
descriptorSpecifies texture and sampler descriptor.

Reimplemented from TextureBackend.

GLuint getHandler ( ) const
inline

Get texture object.

Returns
Texture object.
void apply ( int  index) const

Set texture to pipeline.

Parameters
indexSpecifies the texture image unit selector.

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