Beispiel #1
0
  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));
  }
Beispiel #2
0
void OpenGLContext::FlushContext()
{
    //CCLOG("OpenGLContext::FlushContext");
    _graphics3d.SwapBuffers(pp::BlockUntilComplete());
}