// Draw the SCene void CCDirector::drawScene(void) { // calculate "global" dt calculateDeltaTime(); //tick before glClear: issue #533 if (! m_bPaused) { CCScheduler::sharedScheduler()->tick(m_fDeltaTime); } glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); /* to avoid flickr, nextScene MUST be here: after tick and before draw. XXX: Which bug is this one. It seems that it can't be reproduced with v0.9 */ if (m_pNextScene) { setNextScene(); } glPushMatrix(); applyOrientation(); // By default enable VertexArray, ColorArray, TextureCoordArray and Texture2D CC_ENABLE_DEFAULT_GL_STATES(); // draw the scene if (m_pRunningScene) { m_pRunningScene->visit(); } // draw the notifications node if (m_pNotificationNode) { m_pNotificationNode->visit(); } if (m_bDisplayFPS) { showFPS(); } #if CC_ENABLE_PROFILERS showProfilers(); #endif CC_DISABLE_DEFAULT_GL_STATES(); glPopMatrix(); m_uTotalFrames++; // swap buffers if (m_pobOpenGLView) { m_pobOpenGLView->swapBuffers(); } }
void Floor3::setOrientation(vec3 pOrientation) { orientation = pOrientation; applyOrientation(); }