#include <glscreenviewer.h>
Inheritance diagram for GLScreenViewer:

Public Member Functions | |
| GLScreenViewer (const GLScene *const s, QWidget *parent) | |
| GLScreenViewer (const GLScene *const s, const QGLFormat &format, QWidget *parent) | |
| bool | willReinit () const |
| void | setReinitRequired (bool required) |
| GLenum | matrixMode () const |
| const GLdouble * | projectionMatrix () const |
| const GLdouble * | modelviewMatrix () const |
| bool | autoGLClearEnabled () const |
| bool | autoGLFlushEnabled () const |
| bool | aspectRatioKept () const |
| void | setAutoGLClearEnabled (bool enable) |
| void | setAutoGLFlushEnabled (bool enable) |
| void | setKeepAspectRatio (bool enable) |
Protected Slots | |
| virtual void | setGeometry (int x, int y, int w, int h) |
| virtual void | setGeometry (const QRect &r) |
| virtual void | mousePressEvent (QMouseEvent *) |
| virtual void | mouseDoubleClickEvent (QMouseEvent *) |
| virtual void | mouseReleaseEvent (QMouseEvent *) |
| virtual void | mouseMoveEvent (QMouseEvent *) |
| virtual void | wheelEvent (QWheelEvent *) |
| virtual void | keyPressEvent (QKeyEvent *) |
Protected Member Functions | |
| void | sharedInit () |
| virtual void | init () |
| virtual void | draw () |
| virtual void | preDraw () |
| virtual void | postDraw () |
Private Attributes | |
| const GLScene *const | myScene |
| GLenum | myMatrixMode |
| GLdouble | myProjectionMatrix [16] |
| GLdouble | myModelviewMatrix [16] |
| bool | reinitRequired |
| bool | keepAspectRatio |
| bool | autoGLClear |
| bool | autoGLFlush |
This class is used also to feed information to Glitch and any GLWorldViewer, regarding the current matrix mode, and current model view and projection matrix values. Where by current, we mean the state immediately after the scene is drawn.
Note: Display lists are NOT used to cache the initialization and display commands, as they would enfore too many limitations. For example, many OpenGL commands cannot be placed in display lists, such as those that pass parameters by reference (as they may be out of scope). It would also prevent the user from working with display lists themselves.
|
||||||||||||
|
Constructor. |
|
||||||||||||||||
|
Constructor. This constructor takes a QGLFormat parameter, so that special format options such as double buffering can be enabled and disabled. |
|
|
|
|
|
|
|
|
|
|
|
Execute the OpenGL scene, in its purist form. We also get and store the post-scene matrix mode and the model view and projection matrix values, which will be used by Glitch and GLWorldViewer. Note: This method will perfrom:
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_ACCUM_BUFFER_BIT | GL_STENCIL_BUFFER_BIT ) Note: If reinitRequired = true, then this will restore the OpenGL state, delete any existing display lists and make a few other cleanups so that it can then (re-)initialize the scene, by executing the scene's initializetion commands. Reimplemented from QGLViewer. |
|
|
Initialize OpenGL for the context. This method is called by QGLViewer::initializeGL(). The main reason that this has been implemented, is to undo the non-standard modifications that QGLViewer::initializeGL() makes to the OpenGL initial state. Reimplemented from QGLViewer. |
|
|
Reimplemented as {}, as to disable keyboard interaction. (Exception: mouse button modifiers) Reimplemented from QGLViewer. |
|
|
|
|
|
|
|
|
Reimplemented as {}, as to disable mouse interaction. Reimplemented from QGLViewer. |
|
|
Reimplemented as {}, as to disable mouse interaction. Reimplemented from QGLViewer. |
|
|
Reimplemented as {}, as to disable mouse interaction. Reimplemented from QGLViewer. |
|
|
Reimplemented as {}, as to disable mouse interaction. Reimplemented from QGLViewer. |
|
|
Ban QGLViewer from interfering with the post-draw OpenGL state. We don't need things like the axis, grid or visual hints to be drawn. Reimplemented from QGLViewer. |
|
|
Ban QGLViewer from interfering with the pre-draw OpenGL state. We will look after things like glClear and the matrix modes and values. Reimplemented from QGLViewer. |
|
|
|
|
|
|
|
|
|
|
|
This method looks after actually resizing this widget within its parent, so that it keeps a perfect 1:1 width-to-height aspect ratio. This is called by both GLScreenViewer::setKeepAspectRatio() and just as importantly Qt. Qt wil call this when the parent is resized, hence asking for this widget to update its size. |
|
||||||||||||||||||||
|
This is an overloaded member function, provided for convenience. It behaves essentially like the above function. This corresponds to setGeometry( QRect(x, y, w, h) ) |
|
|
Request that this widget resizes itself within its parent, so that it keeps a perfect 1:1 width-to-height aspect ratio. Note: This method requires that the parent for this widget is valid (i.e. != NULL). |
|
|
Tell the viewer that when it updates again, that it must re-init itself. |
|
|
This method is used by the constructors to perform tasks that are common to all of them. |
|
|
Reimplemented as {}, as to disable mouse interaction. Reimplemented from QGLViewer. |
|
|
This tells us if the viewer will re-init itself on the next update. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.3.2