Jump to content
  • Advertisement

Archived

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

stond

Having trouble w/ my first OpenGL prog.

This topic is 5776 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

I''m coding on a 900Mhz PIII, w/ a Radeon7000 using MSVC++. All I want to do is put a triangle inside of a window, it compiles fine, but when I run the binary it freezes my ''puter. Even in the debugger it crashes. The line it always chokes on is in my WndProc() event handler in my switch(message) statement: //begin my code case WM_SIZE: height = HIWORD(lParam); //retrieve width and height width = LOWORD(lParam); if(height == 0) height = 1; //reset the viewport to new dimensions glViewport(0, 0, width, height); glMatrixMode(GL_PROJECTION); glLoadIdentity(); //calclulate aspect ratio of window gluPerspective(45.0f, (GLfloat)width/(GLfloat)height, 1.0f, 1000.0f); * glMatrixMode(GL_MODELVIEW); * glLoadIdentity; //end my code * glMatrixMode(GL_MODELVIEW); * <-- this is where it freezes, if I take this code out, the rendering device is black like it should be, but my triangle drawing code doesn''t work. If I leave it in, the rendering device is white and the machine locks up... any help would be much appreciated, thanks for atleast reading this.

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!