OpenGL ES 3.0之顶点缓冲(2)


/////////////////////////////////////////////////////////////////
// Called when the view controller's view has been unloaded
// Perform clean-up that is possible when you know the view
// controller's view won't be asked to draw again soon.
- (void)viewDidUnload
{
  [super viewDidUnload];
 
  // Make the view's context current
  GLKView *view = (GLKView *)self.view;
  [EAGLContext setCurrentContext:view.context];
   
  // Delete buffers that aren't needed when view is unloaded
  if (0 != vertexBufferID)
  {
      glDeleteBuffers (1,          // STEP 7
                      &vertexBufferID); 
      vertexBufferID = 0;
  }
 
  // Stop using the context created in -viewDidLoad
  ((GLKView *)self.view).context = nil;
  [EAGLContext setCurrentContext:nil];
}

@end

OpenGL ES 3.0之顶点缓冲

OpenGL编程指南(原书第7版)中文扫描版PDF 下载

-------------------------------------分割线-------------------------------------

OpenGL 渲染篇

Ubuntu 13.04 安装 OpenGL

OpenGL三维球体数据生成与绘制【附源码】

Ubuntu下OpenGL编程基础解析

如何在Ubuntu使用eclipse for c++配置OpenGL

《OpenGL超级宝典》学习笔记

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/28d01416344c5b362d19a54dd93b29ce.html