iDevGames Forums
Combining OpenGL vertex data into 1 object - Printable Version

+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Graphics & Audio Programming (/forum-9.html)
+--- Thread: Combining OpenGL vertex data into 1 object (/thread-9064.html)



Combining OpenGL vertex data into 1 object - Jmcclane - Jun 17, 2011 12:03 PM

Im trying to create an object using 2 sets of vertex data.

The object looks similar to the following

@interface MovementButton : SceneObject
{
sceneObject *innerCircle;
sceneObject *outterCircle;
}

@interface SceneObject : NSObject
{
3DPoint translation;
3DPoint rotation;
3DPoint scale;

3DMesh *mesh;
CGFloat *matrix;
}

The SceneObject class does all the work updating and rendering of vertex data for a single mesh.

I am trying to create an object that displays 2 different circles, 1 circle being contained inside the other. Thus far I have accomplished this task by updating and rendering both objects seperately within the MovementButton class. Im not well versed on matrix multiplication, but I recall reading something about how multiplying the matrix of one set of vertex data with another will "glue" them together. Does anyone no of an easy/efficient way to do this? Ideally, I would like the 2 sets of vertex data to act as one single object without having to update and render them seperately.