Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Theses

OpenGL OPENGL SUCKS DIRECTX FOREVER

This topic is 6556 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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 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

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
The frustum call is in the reshape because if you resize your window you need to update the frustum.

ECKILLER

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!