🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Please help: 3dExploration Question

Started by
1 comment, last by Mike00 23 years, 11 months ago
What do I put in my DrawGLScene function to call my 3dExploration model? I have glCallList(lid); but it doesn''t work. Also, what do I do if I want to load in two different models? I just change lid to another name in the second one? Thanks!
Advertisement
you have to call the function that 3dexploration gives you in your initialization code. this function returns lid, and therefore validates lid. i would actually assign different variables, like:

int playerlist = 0;
int enemylist = 0;

//initcode

playerlist = 3dexplorationfunction();
enemylist = 3dexplorationfunction2();

//main loop

glCallList(playerlist);
glCallList(enemylist);

a2k
------------------General Equation, this is Private Function reporting for duty, sir!a2k
Hmm, it doesn''t show up...

This is what I have:

//global
int yourshiplist=0;
//

//init
yourshiplist=Gen3DObjectList();
//

void Model(){
glLoadIdentity();
glTranslatef(0.0f,0.0f,-6.0f);
glColor3f(1.0f,1.0f,1.0f);
glCallList(yourshiplist);
}

int DrawGLScene(GLvoid){
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
Model();
return TRUE;
}

But when I run it, nothing appears, just black.

Thanks.

This topic is closed to new replies.

Advertisement