Sign in to follow this  
tokyostormdrain

OpenGL Polygons draw, then go wrong

Recommended Posts

Hi all, First off i'm a n00b at openGl programming and just learing the ropes. I am using c#, tao opengl and visual studio express on a geforce 6800 agp driver version 91.31 I am writing a little app based on tutorials I have foudn to explore how openGl works. I have a simple little scene with some particles that fly around. Now i wanted to create an environment cube around the world and decided to make a cube built from parametric planes. I have isolated the problem down to using just one `face` of the cube. I build the plane and stuff the vertex coords into an array that gets assigned to a vertex pointer. I have enabled the client state and draw the plane using glDrawElementArray(); When I run the app at first everything is correct, but if I leave it a few seconds without rotating the viewport the plane will by itself start to render incorrectly with verts seeominglky moved out to infinity and thereby stretching the drawn regions out to the edge of the window. It seems like for some reason it decides to transform the verts in a different way. I can't think of a reason for this and I have checked over my code and tried commenting out to isolate the problem, but still I get the verts pinging off by themselves after no user input after a few seconds. Does anyone have any pointers to what it may be? Thanks for any assistance in helping out this n00b.

Share this post


Link to post
Share on other sites

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