Visualization Library

A lightweight C++ OpenGL middleware for 2D/3D graphics
[Home] [Tutorials] [All Classes] [Grouped Classes]

vlSDL::SDLWindow Class Reference

The SDLWindow class implements an OpenGLContext using the SDL API. More...

#include <SDLWindow.hpp>

Inheritance diagram for vlSDL::SDLWindow:

vl::OpenGLContext vl::Object

List of all members.

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)
virtual void swapBuffers ()
void translateEvent (SDL_Event *ev)
void destroy ()
void quitApplication ()
 Quits the event loop.
void setWindowTitle (const vl::String &)
void setMouseVisible (bool visible)
void setMousePosition (int x, int y)
void update ()
void makeCurrent ()

Static Public Member Functions

static SDL_Surface * sdlSurface ()

Static Protected Attributes

static SDL_Surface * mScreen = NULL


Detailed Description

The SDLWindow class implements an OpenGLContext using the SDL API.

Note:
SDL notifies Unicode codes only on key-press events not on release events.

Constructor & Destructor Documentation

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 (  ) 


Member Function Documentation

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  x,
int  y 
) [virtual]

Reimplemented from vl::OpenGLContext.

void SDLWindow::swapBuffers (  )  [virtual]

Reimplemented from vl::OpenGLContext.

void SDLWindow::translateEvent ( SDL_Event *  ev  ) 

void SDLWindow::destroy (  )  [virtual]

Reimplemented from vl::OpenGLContext.

void SDLWindow::quitApplication (  )  [virtual]

Quits the event loop.

Reimplemented from vl::OpenGLContext.

void SDLWindow::setWindowTitle ( const vl::String title  )  [virtual]

Reimplemented from vl::OpenGLContext.

void vlSDL::SDLWindow::setMouseVisible ( bool  visible  )  [inline, virtual]

Reimplemented from vl::OpenGLContext.

void vlSDL::SDLWindow::setMousePosition ( int  x,
int  y 
) [inline, virtual]

Reimplemented from vl::OpenGLContext.

void SDLWindow::update (  )  [virtual]

Reimplemented from vl::OpenGLContext.

void vlSDL::SDLWindow::makeCurrent (  )  [inline, virtual]

Reimplemented from vl::OpenGLContext.

static SDL_Surface* vlSDL::SDLWindow::sdlSurface (  )  [inline, static]


Member Data Documentation

SDL_Surface * SDLWindow::mScreen = NULL [static, protected]


The documentation for this class was generated from the following files:

Visualization Library v2009.08 Reference Documentation
Copyright 2005-2009 Michele Bosi. All rights reserved.
Updated on Sun Nov 8 14:29:18 2009.
Permission is granted to use this page to write and publish articles regarding Visualization Library.