Sign in to follow this  

Disappearing objects

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

This topic is 4686 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this