void RenderLoop(int32_t) { screen_width = width_; screen_height = height_; glClearColor(0.65f, 0.65f, 0.65f, 1.0f); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); if (rend_framePending()) { while (!rend_single_frame()) ; printf("Rendered frame\n"); } printf("Swapping buffers\n"); context_.SwapBuffers( callback_factory_.NewCallback(&HelloWorldInstance::RenderLoop)); }
void OpenGLContext::FlushContext() { //CCLOG("OpenGLContext::FlushContext"); _graphics3d.SwapBuffers(pp::BlockUntilComplete()); }