Advertisement

Order to put

Started by June 20, 2003 08:04 PM
7 comments, last by nildo 21 years, 8 months ago
Look my situation: ------------------------------------------- glEnable(GL_BLEND) glColor4f(1,1,1,0.70); glBegin(GL_QUADS); glColor3f(1,1,1); glVertex3f( - 0.32, - 0.1, -0.5); glVertex3f( - 0.25, - 0.1, -0.5); glVertex3f( - 0.25, - 0.2, -0.5); glVertex3f( - 0.32, - 0.2, -0.5); glEnd; glDisable(gl_Blend); ------------------------------------------- I Need to draw my 3dWorld. Then in the bottom left of the screen i need to draw that quad. To stay locked there. If i walk or do anything this quad needs to be there. Always there and stopped. There i will write the FPS and something more. This quad need to have alpha blending. Did you undestand the function of this quad? But this quad is alpha blended. So needs to be drawned after everything. Else my 3dWorld will overwritte my quad. How can i draw this Quad after everything? Because if this quad have to stay still in the bottom left, i need to draw it before the Rotate and the Translate. Right? My 3dWorls must be draw after the Rotate and Translate right? Now, how am i going to draw this fixed quad after the 3dWorld ? Please help me!!!! Thank you!
use glLoadIdenitiy(); after you draw everything else. Also you will want to change to an ortho (how to do this is covered in NeHe''s radial blur tut) view as well. Then you can draw anything where ever you want with whatever effects and it will stay there despite your VR world.
[s] [/s]
I can see the fnords.
Advertisement
What do you mean in the Everything else ?
After i call the list that has my 3dworld loaded ?
Ahhhh I got it !!!!!!!!

Thank so mutch !!! Gimme your banc account for me to deposit 99999999 dollars !!! jk

Thanks so mutch!!! Thanx for you, nehe and everyone else that is trying to bring OpenGl to us !!!
I mean after you draw everything (i.e. your world), except this rectangle of yours, call go into orthomode like this:

void ViewOrtho()							// Set Up An Ortho View{	glMatrixMode(GL_PROJECTION);					// Select Projection	glPushMatrix();							// Push The Matrix	glLoadIdentity();						// Reset The Matrix	glOrtho(-1, 1, 1, -1, 0, 0);				// Select Ortho Mode	glMatrixMode(GL_MODELVIEW);					// Select Modelview Matrix	glPushMatrix();							// Push The Matrix	glLoadIdentity();						// Reset The Matrix}void ViewPerspective()							// Set Up A Perspective View{	glMatrixMode( GL_PROJECTION );					// Select Projection	glPopMatrix();							// Pop The Matrix	glMatrixMode( GL_MODELVIEW );					// Select Modelview	glPopMatrix();							// Pop The Matrix}


That is, call ViewOrtho(). Then draw you''re rectangle with any effects you want (note the screen coordinates will now be 2D, with (-1,-1) in the lower left corner (0, 0) in the center and (1, 1) in the upper right corner, instead of 3D so use glVertex2f() instead). Finally switch back to perspective via ViewPerspective().

Mind you, if you don''t want to go ortho view, then you can just call glLoadIdenitiy() instead of ViewOrtho() and ViewPerspective(). This will work just as well, but you will have regular 3D.
[s] [/s]
I can see the fnords.
Great!!

Now if only someone will help me with my perlin Tex Gen Issue.
[s] [/s]
I can see the fnords.
Advertisement
Great! i got it !
Could you tell me whats an Ortho view?
would know when you''re drawing stuff with the regular win32 GDI, and all the coordinates are 2D like they go onto a canvas on the screen. You know flat 2D. That''s ortho (long form is orthometric). Perspective is when you add the 3D dimension into the equation (depth).
[s] [/s]
I can see the fnords.
Tank you

This topic is closed to new replies.

Advertisement