cocos2d-x  3.5
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Grabber Class Reference

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

#include <CCGrabber.h>

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...
 

Protected Attributes

GLuint _FBO
GLint _oldFBO
GLfloat _oldClearColor [4]
- Protected Attributes inherited from Ref
unsigned int _referenceCount
 count of references More...
 

Additional Inherited Members

- Protected Member Functions inherited from Ref
 Ref ()
 Constructor. More...
 

Detailed Description

FBO class that grabs the the contents of the screen.

Constructor & Destructor Documentation

Grabber ( void  )

Constructor.

~Grabber ( void  )

Destructor.

Member Function Documentation

void afterRender ( Texture2D texture)

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

void beforeRender ( Texture2D texture)

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

void grab ( Texture2D texture)

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

Member Data Documentation

GLuint _FBO
protected
GLfloat _oldClearColor[4]
protected
GLint _oldFBO
protected

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