#include <GLWindow.win32.h>
Inherits Frame.
Inheritance diagram for GLWindow:


Public Methods | |
| GLWindow (const string &t="") | |
| Default constructor. | |
| virtual | ~GLWindow () |
| Destructor. | |
| void | setZBufferBits (short z) |
| Set Z-buffer bits, only valid before calling create. | |
| bool | create () |
| Creates a window and OpenGL context. More... | |
| void | quit () |
| Posts a quit message. More... | |
| void | swapBuffers () |
| Swaps OpenGL display buffers. | |
| bool | getFullscreen () |
| Returns the fullscreen flag. | |
| void | fullscreen (bool flag) |
| Sets the fullscreen flag. More... | |
| void | refreshChildren () |
| Refreshes all child Region instances. More... | |
| bool | translateEvent (UINT uMsg, WPARAM wParam, LPARAM lParam, Event &event) |
| Translate a WIN32 message to Event. More... | |
| void | refresh () |
| Repaints the region. More... | |
| void | resize (unsigned short w, unsigned short h) |
| Resizes the region. More... | |
| void | parseSymbol (Token &t, ObjectFile &file) |
| Reads a single parameter sections inside the body of the object description. More... | |
| void | writeParams (ostream &stream) |
| Writes all parameter sections inside the body of the object description. More... | |
Protected Methods | |
| virtual void | initGL () |
| Initialize OpenGL. More... | |
Protected Attributes | |
| string | title |
| Window title. | |
A dubbel buffered window with an associated OpenGL contex. A GLWindow must be explicitly created using the GLWindow::create method. Currently two versions exists: one based on WIN32 and one on X11.
Format: (see Frame)
PARAM ::= FS | TITLE
FS ::= "fullscreen"
TITLE ::= "title" <string>
|
|
Creates a window and OpenGL context. Creates a Win32 OpenGL window in the following steps:
|
|
|
Sets the fullscreen flag. Set the fullscreen flag to 'flag'. If the window is already created the window settings are set appropriately and the screen is resulution is set to fullscreen mode or restored to its default settings.
|
|
|
Initialize OpenGL. Initializes the OpenGL context.
|
|
||||||||||||
|
Reads a single parameter sections inside the body of the object description. Each object has a set of parameter names associated with it, called symbols. Symbols are declared inside the createSymbols method. The method parseSymbol expects the Token t to be such a symbol and reads the corresponding parameters. Unknown symbols are passed to its super class.
Reimplemented from Frame. |
|
|
Posts a quit message. Posts a quit message that will be handled by the underlying Application.
|
|
|
Repaints the region. This method is called whenever the screen is repainted. The repaint method uses OpenGL calls to render the region. Currently it is assumed that regions are refreshed automatically so that no refresh notification has to be done when the region changes state i.e. no refresh has to be forced by the region. Region rendering is done back to front.
Reimplemented from Frame. |
|
|
Refreshes all child Region instances. Sets the OpenGL context for 2D rendering and refresh all child Region instances.
|
|
||||||||||||
|
Resizes the region. Virtual method to change the size of the Region.
Reimplemented from Region. |
|
||||||||||||||||||||
|
Translate a WIN32 message to Event. Translates the Win32 mesage with parameters to an Event. Mouse positions are cached so that all events have proper mounse coordinates.
|
|
|
Writes all parameter sections inside the body of the object description. This method writes all object parameters to ostream. Inhereting classes will always call super::writeParams().
Reimplemented from Frame. |