Visualization LibraryA lightweight C++ OpenGL middleware for 2D/3D graphics |
[Home] [Tutorials] [All Classes] [Grouped Classes] |
The SDLWindow class implements an OpenGLContext using the SDL API. More...
#include <SDLWindow.hpp>
Public Member Functions | |
| SDLWindow () | |
| SDLWindow (const vl::String &title, const vl::OpenGLContextFormat &info, int x=0, int y=0, int width=640, int height=480) | |
| bool | initSDLWindow (const vl::String &title, const vl::OpenGLContextFormat &info, int x=0, int y=0, int width=640, int height=480) |
| ~SDLWindow () | |
| void | setPosition (int x, int y) |
| If the OpenGL context is a widget this function sets its position. | |
| virtual void | swapBuffers () |
| Swaps the back and front buffers to present the last rendering. | |
| void | translateEvent (SDL_Event *ev) |
| void | destroy () |
| This function should be appropriately reimplemented in all the subclasses of OpenGLContext. | |
| void | quitApplication () |
| Quits the event loop. | |
| void | setWindowTitle (const vl::String &) |
| If the OpenGL context is a top window this function sets its title. | |
| void | setMouseVisible (bool visible) |
| If the OpenGL context is a widget this function sets whether the mouse is visible over it or not. | |
| void | setMousePosition (int x, int y) |
| If the OpenGL context is a widget this function sets the mouse position. | |
| void | update () |
| If the OpenGLContext is a widget this function requests a redraw. | |
| void | makeCurrent () |
| Sets the OpenGL context as current for the calling thread. | |
Static Public Member Functions | |
| static SDL_Surface * | sdlSurface () |
Static Protected Attributes | |
| static SDL_Surface * | mScreen = NULL |
The SDLWindow class implements an OpenGLContext using the SDL API.
| SDLWindow::SDLWindow | ( | ) |
| SDLWindow::SDLWindow | ( | const vl::String & | title, |
| const vl::OpenGLContextFormat & | info, | ||
| int | x = 0, |
||
| int | y = 0, |
||
| int | width = 640, |
||
| int | height = 480 |
||
| ) |
| SDLWindow::~SDLWindow | ( | ) |
| bool SDLWindow::initSDLWindow | ( | const vl::String & | title, |
| const vl::OpenGLContextFormat & | info, | ||
| int | x = 0, |
||
| int | y = 0, |
||
| int | width = 640, |
||
| int | height = 480 |
||
| ) |
| void SDLWindow::setPosition | ( | int | , |
| int | |||
| ) | [virtual] |
If the OpenGL context is a widget this function sets its position.
Reimplemented from vl::OpenGLContext.
| void SDLWindow::swapBuffers | ( | ) | [virtual] |
Swaps the back and front buffers to present the last rendering.
Implements vl::OpenGLContext.
| void SDLWindow::translateEvent | ( | SDL_Event * | ev ) |
| void SDLWindow::destroy | ( | ) | [virtual] |
This function should be appropriately reimplemented in all the subclasses of OpenGLContext.
Reimplemented from vl::OpenGLContext.
| void SDLWindow::quitApplication | ( | ) | [virtual] |
Quits the event loop.
Reimplemented from vl::OpenGLContext.
| void SDLWindow::setWindowTitle | ( | const vl::String & | ) | [virtual] |
If the OpenGL context is a top window this function sets its title.
Reimplemented from vl::OpenGLContext.
| void vlSDL::SDLWindow::setMouseVisible | ( | bool | ) | [inline, virtual] |
If the OpenGL context is a widget this function sets whether the mouse is visible over it or not.
Reimplemented from vl::OpenGLContext.
| void vlSDL::SDLWindow::setMousePosition | ( | int | , |
| int | |||
| ) | [inline, virtual] |
If the OpenGL context is a widget this function sets the mouse position.
Reimplemented from vl::OpenGLContext.
| void SDLWindow::update | ( | ) | [virtual] |
If the OpenGLContext is a widget this function requests a redraw.
Reimplemented from vl::OpenGLContext.
| void vlSDL::SDLWindow::makeCurrent | ( | ) | [inline, virtual] |
Sets the OpenGL context as current for the calling thread.
Implements vl::OpenGLContext.
| static SDL_Surface* vlSDL::SDLWindow::sdlSurface | ( | ) | [inline, static] |
SDL_Surface * SDLWindow::mScreen = NULL [static, protected] |