Jump to content
  • Advertisement
Sign in to follow this  
moonshine

Disappearing objects

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

Just a quick question - Ive just written a small program to draw a coloured triangle and a quad on the screen (using NeHe's tutorial 2 or 3 as a basis, and NOT USING C++) Whenever I either resize or minimize the app the two shapes disappear and dont return. Any idea what could cause it?

Share this post


Link to post
Share on other sites
Advertisement
After snooping round MSDN Im assuming it has something to do with the WM_SIZE message in which only my resize function is called so Im assuming the problem is in my resize function:


' Set the viewport
glViewport(INT(0), INT(0), INT(Width), INT(Height))

glMatrixMode(GL_PROJECTION)
glLoadIdentity()

' Setup ortho projection
glOrtho(-0.5, (Width - 0.5), (Height - 0.5), -0.5, -1.0, 1.0)

glMatrixMode(GL_MODELVIEW)
glLoadIdentity()

RETURN

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!