Lefteris
01-12-2010, 09:15 AM
Hello,
In the application I am currently writting I have come across the question of how I can select faces of objects rendered on the screen or the objects themselves.
I am using wxWidgets and as with any other GUI lib I can easily get click Coordinates on the GLCanvas. The problem is how I can understand where on the openGL world the click was. I guess this must be a pretty common question but I can already understand that the answer can't be simple and must depend on how I keep the solids data structure in my program. I would really value any hints or pointers towards the right direction though!
One additional question would be about rendering solids on the screen. I read somewhere that GL_TRIANGLES is the easiest surface for openGL to draw. Is that true? And if it is so then wouldn't it be wise for an application to try and draw everything with triangles only?
In the application I am currently writting I have come across the question of how I can select faces of objects rendered on the screen or the objects themselves.
I am using wxWidgets and as with any other GUI lib I can easily get click Coordinates on the GLCanvas. The problem is how I can understand where on the openGL world the click was. I guess this must be a pretty common question but I can already understand that the answer can't be simple and must depend on how I keep the solids data structure in my program. I would really value any hints or pointers towards the right direction though!
One additional question would be about rendering solids on the screen. I read somewhere that GL_TRIANGLES is the easiest surface for openGL to draw. Is that true? And if it is so then wouldn't it be wise for an application to try and draw everything with triangles only?