cocos2d-x  2.2.3-gd2.113-rev1ec524e
Loading...
Searching...
No Matches
CCTextureProtocol Class Referenceabstract

CCNode objects that uses a CCTexture2D to render the images. More...

#include <CCProtocols.h>

Inheritance diagram for CCTextureProtocol:
[legend]
Collaboration diagram for CCTextureProtocol:
[legend]

Public Member Functions

virtual CCTexture2DgetTexture (void)=0
 Returns the currently used texture. More...
 
virtual void setTexture (CCTexture2D *texture)=0
 Sets a new texuture. More...
 
- Public Member Functions inherited from CCBlendProtocol
virtual void setBlendFunc (ccBlendFunc blendFunc)=0
 Sets the source blending function. More...
 
virtual ccBlendFunc getBlendFunc (void)=0
 Returns the blending function that is currently being used. More...
 

Detailed Description

CCNode objects that uses a CCTexture2D to render the images.

The texture can have a blending function. If the texture has alpha premultiplied the default blending function is: src=GL_ONE dst= GL_ONE_MINUS_SRC_ALPHA else src=GL_SRC_ALPHA dst= GL_ONE_MINUS_SRC_ALPHA But you can change the blending function at any time. NA

Member Function Documentation

◆ getTexture()

virtual CCTexture2D * getTexture ( void  )
pure virtual

Returns the currently used texture.

Returns
The texture that is currenlty being used. NA

Implemented in CCAtlasNode, CCMotionStreak, CCParticleBatchNode, CCParticleSystem, CCSprite, and CCSpriteBatchNode.

◆ setTexture()

virtual void setTexture ( CCTexture2D texture)
pure virtual

Sets a new texuture.

It will be retained.

Parameters
textureA valid CCTexture2D object, which will be applied to this sprite object. NA

Implemented in CCAtlasNode, CCMotionStreak, CCParticleBatchNode, CCParticleSystemQuad, CCSprite, CCSpriteBatchNode, and CCParticleSystem.


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