Jump to content
  • Advertisement
Sign in to follow this  
elp

OpenGL problen with selecting. glRenderMode dont come back

This topic is 5150 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 use c# and Tao frame work. i render some shapes and everything's fine but when i try to activate picking methods the rendering to the screen stops. I am just starting to learn selection and picking. gone through the red book examples, neha and others. gone through the debbuger and the program continue like normal (going through the glDraw) but frozen pic on control. my best idea is that the rendering mode isnt returning to GL_RENDER even though the picking method is as it should be. (call to glRenderMode - gl_render at the end for hits). i found on the web a drawing program in csgl where the outhor comment that " I saw that my worst error was using integers to draw lines in "draw" mode, and floating points when I called the rendering subroutine in "select" mode. OpenGL doesn't like that." can someone clear this up for me and explain how to do picking with tao?

Share this post


Link to post
Share on other sites
Advertisement
Add a glGetError() somewhere. If it returns anything other than GL_NO_ERROR you should convert the error to a string with gluErrorString() and print it out (and post it here if it doesn't make any sense to you.)
Perhaps you could also post the piece of code where you call glRenderMode() and do the rendering?

Share this post


Link to post
Share on other sites
well, after a long checking and trying things out i have
found a solution.

it seems the problem was in the gl control. it has a - AutoSwapBuffers- propertie. the GL_DRAW_BUFFER state is always GL_BACK and i think the switch of the gl rendering context with
glRenderMode corrupt somehow the operation of the AutoSwapBuffers propertie.

I canceled the AutoSwapBuffers and initialized in the Init method - glDrawBuffer(GL_FRONT_AND_BACK) and that worked. dont know much about buffers manipulation currently so i dont realy know what is going on.

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.

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!