PDA

View Full Version : fitInView funtion in opengl



PHANI
19th March 2012, 09:42
hi,some one please tell me i was created cube using opengl QT.the problem is when i given small values of x&y coordinats it is creating properly but for bigger values the cube is adding but i am un able to see those item it is out side of my viewin area.there is a function called fitInView in QGraphicsView is there any similar function for QGLWidget.

wysota
19th March 2012, 10:46
QGLWidget has no knowledge of what you are adding to the scene. You need to reposition your camera manually or use an object oriented approach to OpenGL such as Qt3D that will do some of the things for you.