void reshape(int w, int h)
{
glViewport(0, 0, (GLsizei)w, (GLsizei)h );
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glFrustum(-1.0, 1.0, -1.0, 1.0, 1.5, 20.0);
glMatrixMode(GL_MODELVIEW);
}
i don''t understand why glFrustum is called in reshape and not just once at initialization.
another question, is there any sort of standard for glFrustum and gluPerspective for the fov and near and far i think i remember quake 2 fov default being 90 or something
OPENGL SUCKS DIRECTX FOREVER
ok now that i''ve gotten your attention ignore the subject heading and now that you''re here you might as well help me with my real problem
i just bought the official opengl programming guide third edition and i''m on page 100 (don''t tell anyone i skipped the vertex array part which IMO shouldn''t be so early)
there is sample code on that page and my question relates to that
You don''t know the trick. Saying OpenGL is better in your topic, you get all of the DirectX people coming here to defend our API. You should have said something like:
"Screw OpenGL, I''ll leard Direct3D" or something so that all the OpenGL types come here to prevent you from converting to the dark side.
And as for the frustum question, it''s been a while since I messed with OpenGL, but if I remember correctly, the frustum is dependant on the viewport extents for scaling etc... I could be way off on that, feel free to correct me.
"Screw OpenGL, I''ll leard Direct3D" or something so that all the OpenGL types come here to prevent you from converting to the dark side.
And as for the frustum question, it''s been a while since I messed with OpenGL, but if I remember correctly, the frustum is dependant on the viewport extents for scaling etc... I could be way off on that, feel free to correct me.
I should close this thread just because you wrote such a, for lack of a better word, stupid subject line. Why can''t you people learn that it works just as well to write normal informative subject lines? There is no need to provoke people into answering your question.
- WitchLord
- WitchLord
that wouldve been fun his little trick didnt work, unlike all the others. now... maybe they''ll stop doing it
-----------------------
Today's Tips - 07-12-00
VC++ & General Tidbits
1) VC++ apps are targeted for the win32 environment(duh). But what some people don't
know(you should) is that it can be used as a cross-platform dev. environment and
lots of MAC programmers use it
-----------------------
Today's Tips - 07-12-00
VC++ & General Tidbits
1) VC++ apps are targeted for the win32 environment(duh). But what some people don't
know(you should) is that it can be used as a cross-platform dev. environment and
lots of MAC programmers use it
The frustum call is in the reshape because if you resize your window you need to update the frustum.
ECKILLER
ECKILLER
hey Buster, are you actually selling those games? sorry, just had to ask.
JoeMont001@aol.com www.polarisoft.n3.net
JoeMont001@aol.com www.polarisoft.n3.net
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement