Created
August 7, 2013 00:43
-
-
Save mousebird/6170268 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // FlexiVertexBuffer.h | |
| // NSMeetupExample | |
| // | |
| // Created by sjg@mousebirdconsulting.com on 8/6/13. | |
| // | |
| #import <UIKit/UIKit.h> | |
| #import "SimpleGLObject.h" | |
| @interface FlexiVertexBuffer : NSObject | |
| // Create a flexi buffer with the vertices for a cube centered at the origin | |
| // of the given size | |
| + (FlexiVertexBuffer *)BufferWithCubeAt:(float *)org sized:(float *)size; | |
| // Add a cube to the existing vertices | |
| - (void)addCubeAt:(float *)org sized:(float *)size; | |
| // Vertices are always 24 bytes (3 floats for location + 3 floats for normal) | |
| @property GLuint vertexSize; | |
| // Number of vertices | |
| @property GLuint numVertices; | |
| // Interleaved vertex data | |
| @property NSMutableData *vertices; | |
| // Create a GL Object and its associated buffer from a flexi buffer | |
| - (SimpleGLObject *)makeSimpleGLObject; | |
| @end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment