Search code examples
opengl-es-2.0glkit

Ask about some functions about glkit?


Usually we need to call glport to set up the view port, is it necessary for using glkit?

For double buffer, when using glkit, do we need to use swapbuffer?


Solution

  • The GLKView class automatically maintains a framebuffer and associated renderbuffers, sets the GL viewport to match its size (and scale factor), and manages presenting a rendered frame (i.e. swapping buffers) for display. For the common case, all you need to do is implement drawRect: (or set a delegate and implement glkView:drawInRect: there) and issue GL drawing commands inside that method.