How to draw objects by using OpenGL

Hi all, I have been working on an inventory menu system for some engine. I would like to draw every objects into the engine scene but first I have to write a code for calling a function called World_FindModelByID because that function can draw all objects in game.
My problem is I don't know how to call that function. Every objects in this engine have various ID's values for their correct drawing. I.E: There are every objects from Tomb Raider 3 game on this side: http://imageshack.us/photo/my-images/833/vr9k.png/

What I want to do you can find on this youtube video: https://www.youtube.com/watch?v=s5mkL4UzPow
Please help me

Function called "World_FindModelByID" looks like this:

http://sourceforge.net/p/opentomb/code/ci/c04604b171fa68483c83d6037e0957cd1f4a24a5/tarball (see a function called GenEntitys(struct world_s *world, class VT_Level *tr), line 2117 in resource.cpp)

This is a Gui render module (gui.cpp) where I have to put that code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
void Gui_Render()
{
    Gui_SwitchConGLMode(1);

    Gui_RenderRotatingMenu();  /// it is my function.

    Con_Draw();
    Con_ShowFPS();

    Gui_DrawCrosshair();

    Gui_SwitchConGLMode(0);
}

void Gui_RenderRotatingMenu()  /// it is my function.
{
glPushMatrix();  // save current coordinate system
glTranslatef(0.0, 0.0, 1024.0);  // some distance to the screen
glRotatef(30.0, 1.0, 0.0, 0.0);    // rotate around 0X axis

// here put render code

glPopMatrix(); //restore coordinate system

}
Last edited on
Topic archived. No new replies allowed.