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

Class that creates and handle the main Window and manages how and when to execute the Scenes. More...

#include <CCDirector.h>

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

Public Member Functions

 CCDirector (void)
 ctor More...
 
virtual ~CCDirector (void)
 NA NA. More...
 
virtual bool init (void)
 
virtual long getClassTypeInfo ()
 NA NA. More...
 
CCScenegetRunningScene (void)
 Get current running Scene. More...
 
double getAnimationInterval (void)
 Get the FPS value. More...
 
virtual void setAnimationInterval (double dValue)=0
 Set the FPS value. More...
 
bool isDisplayStats (void)
 Whether or not to display the FPS on the bottom-left corner. More...
 
void setDisplayStats (bool bDisplayStats)
 Display the FPS on the bottom-left corner. More...
 
float getSecondsPerFrame ()
 seconds per frame More...
 
CCEGLViewgetOpenGLView (void)
 Get the CCEGLView, where everything is rendered NA. More...
 
void setOpenGLView (CCEGLView *pobOpenGLView)
 
bool isNextDeltaTimeZero (void)
 
void setNextDeltaTimeZero (bool bNextDeltaTimeZero)
 
bool isPaused (void)
 Whether or not the Director is paused. More...
 
unsigned int getTotalFrames (void)
 How many frames were called since the director started. More...
 
ccDirectorProjection getProjection (void)
 Sets an OpenGL projection. More...
 
void setProjection (ccDirectorProjection kProjection)
 
void reshapeProjection (const CCSize &newWindowSize)
 reshape projection matrix when canvas has been change" More...
 
void setViewport ()
 Sets the glViewport. More...
 
bool isSendCleanupToScene (void)
 How many frames were called since the director started. More...
 
CCNodegetNotificationNode ()
 This object will be visited after the main scene is visited. More...
 
void setNotificationNode (CCNode *node)
 
CCDirectorDelegategetDelegate () const
 CCDirector delegate. More...
 
void setDelegate (CCDirectorDelegate *pDelegate)
 
CCSize getWinSize (void)
 returns the size of the OpenGL view in points. More...
 
CCSize getWinSizeInPixels (void)
 returns the size of the OpenGL view in pixels. More...
 
CCSize getVisibleSize ()
 returns visible size of the OpenGL view in points. More...
 
CCPoint getVisibleOrigin ()
 returns visible origin of the OpenGL view in points. More...
 
CCPoint convertToGL (const CCPoint &obPoint)
 converts a UIKit coordinate to an OpenGL coordinate Useful to convert (multi) touch coordinates to the current layout (portrait or landscape) More...
 
CCPoint convertToUI (const CCPoint &obPoint)
 converts an OpenGL coordinate to a UIKit coordinate Useful to convert node points to window points for calls such as glScissor More...
 
float getZEye (void)
 XXX: missing description. More...
 
void runWithScene (CCScene *pScene)
 Enters the Director's main loop with the given Scene. More...
 
void popScene (void)
 Pops out a scene from the queue. More...
 
void popToRootScene (void)
 Pops out all scenes from the queue until the root scene in the queue. More...
 
void popToSceneStackLevel (int level)
 Pops out all scenes from the queue until it reaches level. More...
 
void end (void)
 Ends the execution, releases the running scene. More...
 
void pause (void)
 Pauses the running scene. More...
 
void resume (void)
 Resumes the paused scene The scheduled timers will be activated again. More...
 
virtual void stopAnimation (void)=0
 Stops the animation. More...
 
virtual void startAnimation (void)=0
 The main loop is triggered again. More...
 
void drawScene (void)
 Draw the scene. More...
 
void purgeCachedData (void)
 Removes cached all cocos2d cached data. More...
 
void setDefaultValues (void)
 sets the default values based on the CCConfiguration info More...
 
void setGLDefaultValues (void)
 sets the OpenGL default values More...
 
void setAlphaBlending (bool bOn)
 enables/disables OpenGL alpha blending More...
 
void setDepthTest (bool bOn)
 enables/disables OpenGL depth test More...
 
virtual void mainLoop (void)=0
 
void setContentScaleFactor (float scaleFactor)
 The size in pixels of the surface. More...
 
float getContentScaleFactor (void)
 
virtual CCSchedulergetScheduler (void)
 
virtual void setScheduler (CCScheduler *var)
 
virtual CCActionManagergetActionManager (void)
 
virtual void setActionManager (CCActionManager *var)
 
virtual CCTouchDispatchergetTouchDispatcher (void)
 
virtual void setTouchDispatcher (CCTouchDispatcher *var)
 
virtual CCKeypadDispatchergetKeypadDispatcher (void)
 
virtual void setKeypadDispatcher (CCKeypadDispatcher *var)
 
virtual CCAccelerometergetAccelerometer (void)
 
virtual void setAccelerometer (CCAccelerometer *var)
 
virtual float getDeltaTime (void)
 
bool pushScene (CCScene *pScene)
 Suspends the execution of the running scene, pushing it on the stack of suspended scenes. More...
 
bool replaceScene (CCScene *pScene)
 Replaces the running scene with a new one. More...
 
- Public Member Functions inherited from CCObject
 CCObject (void)
 
virtual ~CCObject (void)
 NA. More...
 
void release (void)
 
void retain (void)
 
CCObjectautorelease (void)
 
CCObjectcopy (void)
 
bool isSingleReference (void) const
 
unsigned int retainCount (void) const
 
virtual bool isEqual (const CCObject *pObject)
 
virtual void acceptVisitor (CCDataVisitor &visitor)
 
virtual void update (float dt)
 
 CCObject (const CCObject &)
 
CCObjectoperator= (const CCObject &)
 
virtual void encodeWithCoder (DS_Dictionary *)
 
virtual bool canEncode ()
 
CCObjectType getObjType () const
 
virtual int getTag () const
 
virtual void setTag (int nTag)
 
void setObjType (CCObjectType)
 
- Public Member Functions inherited from CCCopying
virtual CCObjectcopyWithZone (CCZone *pZone)
 
virtual long getClassTypeInfo ()=0
 

Static Public Member Functions

static CCDirectorsharedDirector (void)
 returns a shared instance of the director getInstance More...
 
- Static Public Member Functions inherited from CCObject
static CCObjectcreateWithCoder (DS_Dictionary *)
 

Protected Member Functions

void purgeDirector ()
 
void setNextScene (void)
 
void showStats ()
 
void createStatsLabel ()
 
void calculateMPF ()
 
void getFPSImageData (unsigned char **datapointer, unsigned int *length)
 
void calculateDeltaTime ()
 calculates delta time since last time it was called More...
 

Protected Attributes

CCSchedulerm_pScheduler
 CCScheduler associated with this director. More...
 
CCActionManagerm_pActionManager
 CCActionManager associated with this director. More...
 
CCTouchDispatcherm_pTouchDispatcher
 CCTouchDispatcher associated with this director. More...
 
CCKeypadDispatcherm_pKeypadDispatcher
 CCKeypadDispatcher associated with this director. More...
 
CCAccelerometerm_pAccelerometer
 CCAccelerometer associated with this director. More...
 
float m_fDeltaTime
 
bool m_bPurgeDirecotorInNextLoop
 
CCEGLViewm_pobOpenGLView
 
double m_dAnimationInterval
 
double m_dOldAnimationInterval
 
bool m_bLandscape
 
bool m_bDisplayStats
 
float m_fAccumDt
 
float m_fFrameRate
 
CCLabelAtlasm_pFPSLabel
 
CCLabelAtlasm_pSPFLabel
 
CCLabelAtlasm_pDrawsLabel
 
bool m_bPaused
 Whether or not the Director is paused. More...
 
unsigned int m_uTotalFrames
 
unsigned int m_uFrames
 
float m_fSecondsPerFrame
 
CCScenem_pRunningScene
 
CCScenem_pNextScene
 
bool m_bSendCleanupToScene
 
CCArraym_pobScenesStack
 
struct cc_timevalm_pLastUpdate
 
bool m_bNextDeltaTimeZero
 
ccDirectorProjection m_eProjection
 
CCSize m_obWinSizeInPoints
 
float m_fContentScaleFactor
 
char * m_pszFPS
 
CCNodem_pNotificationNode
 
CCDirectorDelegatem_pProjectionDelegate
 
char m_achPadding [0x4]
 
- Protected Attributes inherited from CCObject
unsigned int m_uReference
 
unsigned int m_uAutoReleaseCount
 
int m_nTag
 
int m_eObjType
 
unsigned int m_uObjectIdxInArray
 

Friends

class CCEGLViewProtocol
 
float m_fScreenScaleFactor
 
float m_fScreenScaleFactorMax
 
float m_fScreenScaleFactorW
 
float m_fScreenScaleFactorH
 
float m_fScreenTop
 
float m_fScreenBottom
 
float m_fScreenLeft
 
float m_fScreenRight
 
CCScenem_pSceneReference
 
 CCDirector (const CCDirector &)
 
CCDirectoroperator= (const CCDirector &)
 
void checkSceneReference (void)
 
CCScenegetNextScene (void)
 
int levelForSceneInStack (CCScene *)
 
bool popSceneWithTransition (float, PopTransition)
 
void popToSceneInStack (CCScene *)
 
int sceneCount (void)
 
void willSwitchToScene (CCScene *)
 
void removeStatsLabel (void)
 
void resetSmoothFixCounter (void)
 
void setDeltaTime (float)
 
void setupScreenScale (CCSize, CCSize, TextureQuality)
 
void updateContentScale (TextureQuality)
 
void updateScreenScale (CCSize)
 
TextureQuality getLoadedTextureQuality (void) const
 
float getScreenScaleFactor (void)
 
float getScreenScaleFactorMax (void)
 
float getScreenScaleFactorW (void)
 
float getScreenScaleFactorH (void)
 
float getScreenTop (void)
 
float getScreenBottom (void)
 
float getScreenLeft (void)
 
float getScreenRight (void)
 
CCScenegetSceneReference (void)
 
void setSceneReference (CCScene *var)
 
CCKeyboardDispatcherm_pKeyboardDispatcher
 
CCMouseDispatcherm_pMouseDispatcher
 
virtual CCKeyboardDispatchergetKeyboardDispatcher (void)
 
virtual void setKeyboardDispatcher (CCKeyboardDispatcher *var)
 
virtual CCMouseDispatchergetMouseDispatcher (void)
 
virtual void setMouseDispatcher (CCMouseDispatcher *var)
 
float m_fActualDeltaTime
 
float getActualDeltaTime (void)
 
void setActualDeltaTime (float var)
 
bool m_bIsTransitioning
 
bool m_bSmoothFix
 
bool m_bSmoothFixCheck
 
bool m_bForceSmoothFix
 
int m_nSmoothFixCounter
 
bool getIsTransitioning (void)
 
bool getSmoothFix (void)
 
void setSmoothFix (bool var)
 
bool getSmoothFixCheck (void)
 
void setSmoothFixCheck (bool var)
 
bool getForceSmoothFix (void)
 
void setForceSmoothFix (bool var)
 
int getSmoothFixCounter (void)
 
CCSceneDelegate * m_pAppDelegate
 
bool m_bDontCallWillSwitch
 
CCSize m_obScaleFactor
 
CCSize m_obResolutionInPixels
 
TextureQuality m_eTextureQuality
 
virtual CCSceneDelegate * getSceneDelegate (void)
 
virtual void setSceneDelegate (CCSceneDelegate *var)
 
bool getDontCallWillSwitch (void)
 
void setDontCallWillSwitch (bool var)
 

Additional Inherited Members

- Public Attributes inherited from CCObject
unsigned int m_uID
 
int m_nLuaID
 

Detailed Description

Class that creates and handle the main Window and manages how and when to execute the Scenes.

The CCDirector is also responsible for:

  • initializing the OpenGL context
  • setting the OpenGL pixel format (default on is RGB565)
  • setting the OpenGL buffer depth (default one is 0-bit)
  • setting the projection (default one is 3D)
  • setting the orientation (default one is Portrait)

Since the CCDirector is a singleton, the standard way to use it is by calling: _ CCDirector::sharedDirector()->methodName();

The CCDirector also sets the default OpenGL context:

  • GL_TEXTURE_2D is enabled
  • GL_VERTEX_ARRAY is enabled
  • GL_COLOR_ARRAY is enabled
  • GL_TEXTURE_COORD_ARRAY is enabled

Constructor & Destructor Documentation

◆ CCDirector() [1/2]

CCDirector ( void  )

ctor

◆ ~CCDirector()

virtual ~CCDirector ( void  )
virtual

NA NA.

◆ CCDirector() [2/2]

CCDirector ( const CCDirector )
Remarks
Added by RobTop. See RT_ADD for more info.

Member Function Documentation

◆ calculateDeltaTime()

void calculateDeltaTime ( )
protected

calculates delta time since last time it was called

◆ calculateMPF()

void calculateMPF ( )
protected

◆ checkSceneReference()

void checkSceneReference ( void  )
Remarks
Added by RobTop. See RT_ADD for more info.

◆ convertToGL()

CCPoint convertToGL ( const CCPoint obPoint)

converts a UIKit coordinate to an OpenGL coordinate Useful to convert (multi) touch coordinates to the current layout (portrait or landscape)

◆ convertToUI()

CCPoint convertToUI ( const CCPoint obPoint)

converts an OpenGL coordinate to a UIKit coordinate Useful to convert node points to window points for calls such as glScissor

◆ createStatsLabel()

void createStatsLabel ( )
protected

◆ drawScene()

void drawScene ( void  )

Draw the scene.

This method is called every frame. Don't call it manually.

◆ end()

void end ( void  )

Ends the execution, releases the running scene.

It doesn't remove the OpenGL view from its parent. You have to do it manually.

◆ getAccelerometer()

virtual CCAccelerometer * getAccelerometer ( void  )
virtual

◆ getActionManager()

virtual CCActionManager * getActionManager ( void  )
virtual

◆ getActualDeltaTime()

float getActualDeltaTime ( void  )
Remarks
Added by RobTop. See RT_ADD for more info.

◆ getAnimationInterval()

double getAnimationInterval ( void  )
inline

Get the FPS value.

◆ getClassTypeInfo()

virtual long getClassTypeInfo ( )
inlinevirtual

NA NA.

Implements TypeInfo.

◆ getContentScaleFactor()

float getContentScaleFactor ( void  )

◆ getDelegate()

CCDirectorDelegate * getDelegate ( ) const

CCDirector delegate.

It shall implemente the CCDirectorDelegate protocol

Since
v0.99.5

◆ getDeltaTime()

virtual float getDeltaTime ( void  )
virtual

◆ getDontCallWillSwitch()

bool getDontCallWillSwitch ( void  )
Remarks
Added by RobTop. See RT_ADD for more info.

◆ getForceSmoothFix()

bool getForceSmoothFix ( void  )
Remarks
Added by RobTop. See RT_ADD for more info.

◆ getFPSImageData()

void getFPSImageData ( unsigned char **  datapointer,
unsigned int *  length 
)
protected

◆ getIsTransitioning()

bool getIsTransitioning ( void  )
Remarks
Added by RobTop. See RT_ADD for more info.

◆ getKeyboardDispatcher()

virtual CCKeyboardDispatcher * getKeyboardDispatcher ( void  )
virtual
Remarks
Added by RobTop. See RT_ADD for more info.

◆ getKeypadDispatcher()

virtual CCKeypadDispatcher * getKeypadDispatcher ( void  )
virtual

◆ getLoadedTextureQuality()

TextureQuality getLoadedTextureQuality ( void  ) const
Remarks
Added by RobTop. See RT_ADD for more info.

◆ getMouseDispatcher()

virtual CCMouseDispatcher * getMouseDispatcher ( void  )
virtual
Remarks
Added by RobTop. See RT_ADD for more info.

◆ getNextScene()

CCScene * getNextScene ( void  )
Remarks
Added by RobTop. See RT_ADD for more info.

◆ getNotificationNode()

CCNode * getNotificationNode ( )

This object will be visited after the main scene is visited.

This object MUST implement the "visit" selector. Useful to hook a notification object, like CCNotifications (http://github.com/manucorporat/CCNotifications)

Since
v0.99.5

◆ getOpenGLView()

CCEGLView * getOpenGLView ( void  )
inline

Get the CCEGLView, where everything is rendered NA.

◆ getProjection()

ccDirectorProjection getProjection ( void  )
inline

Sets an OpenGL projection.

Since
v0.8.2 NA

◆ getRunningScene()

CCScene * getRunningScene ( void  )
inline

Get current running Scene.

Director can only run one Scene at the time

◆ getSceneDelegate()

virtual CCSceneDelegate * getSceneDelegate ( void  )
virtual
Remarks
Added by RobTop. See RT_ADD for more info.

◆ getSceneReference()

CCScene * getSceneReference ( void  )
Remarks
Added by RobTop. See RT_ADD for more info.

◆ getScheduler()

virtual CCScheduler * getScheduler ( void  )
virtual

◆ getScreenBottom()

float getScreenBottom ( void  )
Remarks
Added by RobTop. See RT_ADD for more info.

◆ getScreenLeft()

float getScreenLeft ( void  )
Remarks
Added by RobTop. See RT_ADD for more info.

◆ getScreenRight()

float getScreenRight ( void  )
Remarks
Added by RobTop. See RT_ADD for more info.

◆ getScreenScaleFactor()

float getScreenScaleFactor ( void  )
Remarks
Added by RobTop. See RT_ADD for more info.

◆ getScreenScaleFactorH()

float getScreenScaleFactorH ( void  )
Remarks
Added by RobTop. See RT_ADD for more info.

◆ getScreenScaleFactorMax()

float getScreenScaleFactorMax ( void  )
Remarks
Added by RobTop. See RT_ADD for more info.

◆ getScreenScaleFactorW()

float getScreenScaleFactorW ( void  )
Remarks
Added by RobTop. See RT_ADD for more info.

◆ getScreenTop()

float getScreenTop ( void  )
Remarks
Added by RobTop. See RT_ADD for more info.

◆ getSecondsPerFrame()

float getSecondsPerFrame ( )
inline

seconds per frame

◆ getSmoothFix()

bool getSmoothFix ( void  )
Remarks
Added by RobTop. See RT_ADD for more info.

◆ getSmoothFixCheck()

bool getSmoothFixCheck ( void  )
Remarks
Added by RobTop. See RT_ADD for more info.

◆ getSmoothFixCounter()

int getSmoothFixCounter ( void  )
Remarks
Added by RobTop. See RT_ADD for more info.

◆ getTotalFrames()

unsigned int getTotalFrames ( void  )
inline

How many frames were called since the director started.

◆ getTouchDispatcher()

virtual CCTouchDispatcher * getTouchDispatcher ( void  )
virtual

◆ getVisibleOrigin()

CCPoint getVisibleOrigin ( )

returns visible origin of the OpenGL view in points.

◆ getVisibleSize()

CCSize getVisibleSize ( )

returns visible size of the OpenGL view in points.

the value is equal to getWinSize if don't invoke CCEGLView::setDesignResolutionSize()

◆ getWinSize()

CCSize getWinSize ( void  )

returns the size of the OpenGL view in points.

◆ getWinSizeInPixels()

CCSize getWinSizeInPixels ( void  )

returns the size of the OpenGL view in pixels.

◆ getZEye()

float getZEye ( void  )

XXX: missing description.

◆ init()

virtual bool init ( void  )
virtual

◆ isDisplayStats()

bool isDisplayStats ( void  )
inline

Whether or not to display the FPS on the bottom-left corner.

◆ isNextDeltaTimeZero()

bool isNextDeltaTimeZero ( void  )
inline

◆ isPaused()

bool isPaused ( void  )
inline

Whether or not the Director is paused.

◆ isSendCleanupToScene()

bool isSendCleanupToScene ( void  )
inline

How many frames were called since the director started.

Whether or not the replaced scene will receive the cleanup message. If the new scene is pushed, then the old scene won't receive the "cleanup" message. If the new scene replaces the old one, the it will receive the "cleanup" message.

Since
v0.99.0

◆ levelForSceneInStack()

int levelForSceneInStack ( CCScene )
Remarks
Added by RobTop. See RT_ADD for more info.

◆ mainLoop()

virtual void mainLoop ( void  )
pure virtual

Implemented in CCDisplayLinkDirector.

◆ operator=()

CCDirector & operator= ( const CCDirector )
Remarks
Added by RobTop. See RT_ADD for more info.

◆ pause()

void pause ( void  )

Pauses the running scene.

The running scene will be drawed but all scheduled timers will be paused While paused, the draw rate will be 4 FPS to reduce CPU consumption

◆ popScene()

void popScene ( void  )

Pops out a scene from the queue.

This scene will replace the running one. The running scene will be deleted. If there are no more scenes in the stack the execution is terminated. ONLY call it if there is a running scene.

◆ popSceneWithTransition()

bool popSceneWithTransition ( float  ,
PopTransition   
)
Remarks
Added by RobTop. See RT_ADD for more info.

◆ popToRootScene()

void popToRootScene ( void  )

Pops out all scenes from the queue until the root scene in the queue.

This scene will replace the running one. Internally it will call popToSceneStackLevel(1)

◆ popToSceneInStack()

void popToSceneInStack ( CCScene )
Remarks
Added by RobTop. See RT_ADD for more info.

◆ popToSceneStackLevel()

void popToSceneStackLevel ( int  level)

Pops out all scenes from the queue until it reaches level.

If level is 0, it will end the director. If level is 1, it will pop all scenes until it reaches to root scene. If level is <= than the current stack level, it won't do anything.

◆ purgeCachedData()

void purgeCachedData ( void  )

Removes cached all cocos2d cached data.

It will purge the CCTextureCache, CCSpriteFrameCache, CCLabelBMFont cache

Since
v0.99.3

◆ purgeDirector()

void purgeDirector ( )
protected

◆ pushScene()

bool pushScene ( CCScene pScene)

Suspends the execution of the running scene, pushing it on the stack of suspended scenes.

The new scene will be executed. Try to avoid big stacks of pushed scenes to reduce memory allocation. ONLY call it if there is a running scene.

Remarks
Added by RobTop. See RT_ADD for more info.

◆ removeStatsLabel()

void removeStatsLabel ( void  )
Remarks
Added by RobTop. See RT_ADD for more info.

◆ replaceScene()

bool replaceScene ( CCScene pScene)

Replaces the running scene with a new one.

The running scene is terminated. ONLY call it if there is a running scene.

Remarks
Added by RobTop. See RT_ADD for more info.

◆ resetSmoothFixCounter()

void resetSmoothFixCounter ( void  )
Remarks
Added by RobTop. See RT_ADD for more info.

◆ reshapeProjection()

void reshapeProjection ( const CCSize newWindowSize)

reshape projection matrix when canvas has been change"

◆ resume()

void resume ( void  )

Resumes the paused scene The scheduled timers will be activated again.

The "delta time" will be 0 (as if the game wasn't paused)

◆ runWithScene()

void runWithScene ( CCScene pScene)

Enters the Director's main loop with the given Scene.

Call it to run only your FIRST scene. Don't call it if there is already a running scene.

It will call pushScene: and then it will call startAnimation

◆ sceneCount()

int sceneCount ( void  )
Remarks
Added by RobTop. See RT_ADD for more info.

◆ setAccelerometer()

virtual void setAccelerometer ( CCAccelerometer var)
virtual

◆ setActionManager()

virtual void setActionManager ( CCActionManager var)
virtual

◆ setActualDeltaTime()

void setActualDeltaTime ( float  var)
Remarks
Added by RobTop. See RT_ADD for more info.

◆ setAlphaBlending()

void setAlphaBlending ( bool  bOn)

enables/disables OpenGL alpha blending

◆ setAnimationInterval()

virtual void setAnimationInterval ( double  dValue)
pure virtual

Set the FPS value.

Implemented in CCDisplayLinkDirector.

◆ setContentScaleFactor()

void setContentScaleFactor ( float  scaleFactor)

The size in pixels of the surface.

It could be different than the screen size. High-res devices might have a higher surface size than the screen size. Only available when compiled using SDK >= 4.0.

Since
v0.99.4

◆ setDefaultValues()

void setDefaultValues ( void  )

sets the default values based on the CCConfiguration info

◆ setDelegate()

void setDelegate ( CCDirectorDelegate pDelegate)

◆ setDeltaTime()

void setDeltaTime ( float  )
Remarks
Added by RobTop. See RT_ADD for more info.

◆ setDepthTest()

void setDepthTest ( bool  bOn)

enables/disables OpenGL depth test

◆ setDisplayStats()

void setDisplayStats ( bool  bDisplayStats)
inline

Display the FPS on the bottom-left corner.

◆ setDontCallWillSwitch()

void setDontCallWillSwitch ( bool  var)
Remarks
Added by RobTop. See RT_ADD for more info.

◆ setForceSmoothFix()

void setForceSmoothFix ( bool  var)
Remarks
Added by RobTop. See RT_ADD for more info.

◆ setGLDefaultValues()

void setGLDefaultValues ( void  )

sets the OpenGL default values

◆ setKeyboardDispatcher()

virtual void setKeyboardDispatcher ( CCKeyboardDispatcher var)
virtual
Remarks
Added by RobTop. See RT_ADD for more info.

◆ setKeypadDispatcher()

virtual void setKeypadDispatcher ( CCKeypadDispatcher var)
virtual

◆ setMouseDispatcher()

virtual void setMouseDispatcher ( CCMouseDispatcher var)
virtual
Remarks
Added by RobTop. See RT_ADD for more info.

◆ setNextDeltaTimeZero()

void setNextDeltaTimeZero ( bool  bNextDeltaTimeZero)

◆ setNextScene()

void setNextScene ( void  )
protected

◆ setNotificationNode()

void setNotificationNode ( CCNode node)

◆ setOpenGLView()

void setOpenGLView ( CCEGLView pobOpenGLView)

◆ setProjection()

void setProjection ( ccDirectorProjection  kProjection)

◆ setSceneDelegate()

virtual void setSceneDelegate ( CCSceneDelegate *  var)
virtual
Remarks
Added by RobTop. See RT_ADD for more info.

◆ setSceneReference()

void setSceneReference ( CCScene var)
Remarks
Added by RobTop. See RT_ADD for more info.

◆ setScheduler()

virtual void setScheduler ( CCScheduler var)
virtual

◆ setSmoothFix()

void setSmoothFix ( bool  var)
Remarks
Added by RobTop. See RT_ADD for more info.

◆ setSmoothFixCheck()

void setSmoothFixCheck ( bool  var)
Remarks
Added by RobTop. See RT_ADD for more info.

◆ setTouchDispatcher()

virtual void setTouchDispatcher ( CCTouchDispatcher var)
virtual

◆ setupScreenScale()

void setupScreenScale ( CCSize  ,
CCSize  ,
TextureQuality   
)
Remarks
Added by RobTop. See RT_ADD for more info.

◆ setViewport()

void setViewport ( )

Sets the glViewport.

◆ sharedDirector()

static CCDirector * sharedDirector ( void  )
static

returns a shared instance of the director getInstance

◆ showStats()

void showStats ( )
protected

◆ startAnimation()

virtual void startAnimation ( void  )
pure virtual

The main loop is triggered again.

Call this function only if [stopAnimation] was called earlier

Warning
Don't call this function to start the main loop. To run the main loop call runWithScene

Implemented in CCDisplayLinkDirector.

◆ stopAnimation()

virtual void stopAnimation ( void  )
pure virtual

Stops the animation.

Nothing will be drawn. The main loop won't be triggered anymore. If you don't want to pause your animation call [pause] instead.

Implemented in CCDisplayLinkDirector.

◆ updateContentScale()

void updateContentScale ( TextureQuality  )
Remarks
Added by RobTop. See RT_ADD for more info.

◆ updateScreenScale()

void updateScreenScale ( CCSize  )
Remarks
Added by RobTop. See RT_ADD for more info.

◆ willSwitchToScene()

void willSwitchToScene ( CCScene )
Remarks
Added by RobTop. See RT_ADD for more info.

Friends And Related Function Documentation

◆ CCEGLViewProtocol

friend class CCEGLViewProtocol
friend

Member Data Documentation

◆ m_achPadding

char m_achPadding[ 0x4]
protected
Remarks
Added by RobTop. See RT_ADD for more info.
Warning
This field is unknown and may contain data of any type. Do not use.

◆ m_bDisplayStats

bool m_bDisplayStats
protected

◆ m_bDontCallWillSwitch

bool m_bDontCallWillSwitch
protected
Remarks
Added by RobTop. See RT_ADD for more info.

◆ m_bForceSmoothFix

bool m_bForceSmoothFix
protected
Remarks
Added by RobTop. See RT_ADD for more info.

◆ m_bIsTransitioning

bool m_bIsTransitioning
protected
Remarks
Added by RobTop. See RT_ADD for more info.

◆ m_bLandscape

bool m_bLandscape
protected

◆ m_bNextDeltaTimeZero

bool m_bNextDeltaTimeZero
protected

◆ m_bPaused

bool m_bPaused
protected

Whether or not the Director is paused.

◆ m_bPurgeDirecotorInNextLoop

bool m_bPurgeDirecotorInNextLoop
protected

◆ m_bSendCleanupToScene

bool m_bSendCleanupToScene
protected

◆ m_bSmoothFix

bool m_bSmoothFix
protected
Remarks
Added by RobTop. See RT_ADD for more info.

◆ m_bSmoothFixCheck

bool m_bSmoothFixCheck
protected
Remarks
Added by RobTop. See RT_ADD for more info.

◆ m_dAnimationInterval

double m_dAnimationInterval
protected

◆ m_dOldAnimationInterval

double m_dOldAnimationInterval
protected

◆ m_eProjection

ccDirectorProjection m_eProjection
protected

◆ m_eTextureQuality

TextureQuality m_eTextureQuality
Remarks
Added by RobTop. See RT_ADD for more info.

◆ m_fAccumDt

float m_fAccumDt
protected

◆ m_fActualDeltaTime

float m_fActualDeltaTime
protected
Remarks
Added by RobTop. See RT_ADD for more info.

◆ m_fContentScaleFactor

float m_fContentScaleFactor
protected

◆ m_fDeltaTime

float m_fDeltaTime
protected

◆ m_fFrameRate

float m_fFrameRate
protected

◆ m_fScreenBottom

float m_fScreenBottom
protected
Remarks
Added by RobTop. See RT_ADD for more info.

◆ m_fScreenLeft

float m_fScreenLeft
protected
Remarks
Added by RobTop. See RT_ADD for more info.

◆ m_fScreenRight

float m_fScreenRight
protected
Remarks
Added by RobTop. See RT_ADD for more info.

◆ m_fScreenScaleFactor

float m_fScreenScaleFactor
protected
Remarks
Added by RobTop. See RT_ADD for more info.

◆ m_fScreenScaleFactorH

float m_fScreenScaleFactorH
protected
Remarks
Added by RobTop. See RT_ADD for more info.

◆ m_fScreenScaleFactorMax

float m_fScreenScaleFactorMax
protected
Remarks
Added by RobTop. See RT_ADD for more info.

◆ m_fScreenScaleFactorW

float m_fScreenScaleFactorW
protected
Remarks
Added by RobTop. See RT_ADD for more info.

◆ m_fScreenTop

float m_fScreenTop
protected
Remarks
Added by RobTop. See RT_ADD for more info.

◆ m_fSecondsPerFrame

float m_fSecondsPerFrame
protected

◆ m_nSmoothFixCounter

int m_nSmoothFixCounter
protected
Remarks
Added by RobTop. See RT_ADD for more info.

◆ m_obResolutionInPixels

CCSize m_obResolutionInPixels
Remarks
Added by RobTop. See RT_ADD for more info.

◆ m_obScaleFactor

CCSize m_obScaleFactor
Remarks
Added by RobTop. See RT_ADD for more info.

◆ m_obWinSizeInPoints

CCSize m_obWinSizeInPoints
protected

◆ m_pAccelerometer

CCAccelerometer* m_pAccelerometer
protected

CCAccelerometer associated with this director.

Since
v2.0 NA NA

◆ m_pActionManager

CCActionManager* m_pActionManager
protected

CCActionManager associated with this director.

Since
v2.0

◆ m_pAppDelegate

CCSceneDelegate* m_pAppDelegate
protected
Remarks
Added by RobTop. See RT_ADD for more info.

◆ m_pDrawsLabel

CCLabelAtlas* m_pDrawsLabel
protected

◆ m_pFPSLabel

CCLabelAtlas* m_pFPSLabel
protected

◆ m_pKeyboardDispatcher

CCKeyboardDispatcher* m_pKeyboardDispatcher
protected
Remarks
Added by RobTop. See RT_ADD for more info.

◆ m_pKeypadDispatcher

CCKeypadDispatcher* m_pKeypadDispatcher
protected

CCKeypadDispatcher associated with this director.

Since
v2.0

◆ m_pLastUpdate

struct cc_timeval* m_pLastUpdate
protected

◆ m_pMouseDispatcher

CCMouseDispatcher* m_pMouseDispatcher
protected
Remarks
Added by RobTop. See RT_ADD for more info.

◆ m_pNextScene

CCScene* m_pNextScene
protected

◆ m_pNotificationNode

CCNode* m_pNotificationNode
protected

◆ m_pobOpenGLView

CCEGLView* m_pobOpenGLView
protected

◆ m_pobScenesStack

CCArray* m_pobScenesStack
protected

◆ m_pProjectionDelegate

CCDirectorDelegate* m_pProjectionDelegate
protected

◆ m_pRunningScene

CCScene* m_pRunningScene
protected

◆ m_pSceneReference

CCScene* m_pSceneReference
protected
Remarks
Added by RobTop. See RT_ADD for more info.

◆ m_pScheduler

CCScheduler* m_pScheduler
protected

CCScheduler associated with this director.

Since
v2.0

◆ m_pSPFLabel

CCLabelAtlas* m_pSPFLabel
protected

◆ m_pszFPS

char* m_pszFPS
protected

◆ m_pTouchDispatcher

CCTouchDispatcher* m_pTouchDispatcher
protected

CCTouchDispatcher associated with this director.

Since
v2.0

◆ m_uFrames

unsigned int m_uFrames
protected

◆ m_uTotalFrames

unsigned int m_uTotalFrames
protected

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