Skip to content

Instantly share code, notes, and snippets.

@mousebird
Last active December 20, 2015 17:39
Show Gist options
  • Save mousebird/6170256 to your computer and use it in GitHub Desktop.
Save mousebird/6170256 to your computer and use it in GitHub Desktop.
//
// SimpleGLObject.h
// NSMeetupExample
//
// Created by sjg@mousebirdconsulting.com on 8/6/13.
//
#import <UIKit/UIKit.h>
/* A wrapper around the data we need to draw a single
OpenGL ES related object.
*/
@interface SimpleGLObject : NSObject
// The buffer in OpenGL driver space containing the vertices
@property GLuint vertexBuffer;
// Vertex arrays contain the state to draw our object
@property GLuint vertexArray;
// The number of vertices we'll be drawing (3 * numTriangles)
@property GLuint numVertices;
// Size of the vertices
@property GLuint vertexSize;
// Set up the vertex array object. Only on the main thread.
- (void)makeVertexArray;
// Clean up objects in OpenGL ES context
- (void)tearDownGL;
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment