PDA

View Full Version : drawing a dashboard



romb
07-10-2002, 04:55 AM
Hello,
I'd like to draw a picture that move with the screen on the scene like we can see in Starcraft for example, a piece of the screen where you can choose an house ...
Someone can help me ?

owcs
07-14-2002, 04:13 PM
i am not sure if i understand you question, but if you are trying to do some sort of a user interface that stays where it is no matter how you move the camera, you might want to do a 2d overlay of some sort. eg.

glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(...);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();

//do some 3d rendering

glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(...);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();

// do some 2d rendering

glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(...);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();

// do some more 3d rendering

hope this helps

romb
07-16-2002, 04:52 AM
yes i think we speak about the same idea. My pb is i started a program 5 months ago and i have only now the time to continue it.
I have heard of a way with the stencil buffer to draw a so called frozed picture that i will use as an interface with the user of the program. If someone can help me about this or have another idea to obtain similar results, i'd like to know this !!
thanks for your answers.