Cocos2d-x  v3.15
Grabber Class Reference

FBO class that grabs the contents of the screen. More...

Inheritance diagram for Grabber:
Ref

Public Member Functions

 Grabber (void)
 Constructor. More...
 
 ~Grabber (void)
 Destructor. More...
 
void grab (Texture2D *texture)
 Init the grab structure, will set the texture as the FBO color attachment. More...
 
void beforeRender (Texture2D *texture)
 Begin capture the screen, which will save the old FBO, clear color, and set the new FBO, clear the background. More...
 
void afterRender (Texture2D *texture)
 After capture, will reset the old FBO and clear color. More...
 
- Public Member Functions inherited from Ref
void retain ()
 Retains the ownership. More...
 
void release ()
 Releases the ownership immediately. More...
 
Refautorelease ()
 Releases the ownership sometime soon automatically. More...
 
unsigned int getReferenceCount () const
 Returns the Ref's current reference count. More...
 
virtual ~Ref ()
 Destructor. More...
 

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

FBO class that grabs the contents of the screen.

Constructor & Destructor Documentation

◆ Grabber()

Grabber ( void  )

Constructor.

ctor

◆ ~Grabber()

~Grabber ( void  )

Destructor.

NA NA

Member Function Documentation

◆ grab()

void grab ( Texture2D texture)

Init the grab structure, will set the texture as the FBO color attachment.

◆ beforeRender()

void beforeRender ( Texture2D texture)

Begin capture the screen, which will save the old FBO, clear color, and set the new FBO, clear the background.

◆ afterRender()

void afterRender ( Texture2D texture)

After capture, will reset the old FBO and clear color.


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