BALL::VIEW::GLRenderWindow Class Reference

Model of the RenderWindow which uses OpenGL to render its buffer to the screen. More...

#include <glRenderWindow.h>

Inheritance diagram for BALL::VIEW::GLRenderWindow:
Inheritance graph
[legend]

List of all members.


Public Member Functions

GLRenderWindow (QWidget *parent_widget, const char *name=NULL, Qt::WFlags w_flags=0)
GLRenderWindow (const GLRenderWindow &window, QWidget *parent_widget, const char *name=NULL, Qt::WFlags w_flags=0)
virtual bool init ()
virtual bool resize (const unsigned int width, const unsigned int height)
Request new window size.
virtual void refresh ()
Request that the image is actually displayed on the screen or other device the window encapsulated.
virtual void renderText (int x, int y, const String &text, const ColorRGBA &color, Size size=16)
virtual void renderText (float x, float y, float z, const String &text, const ColorRGBA &color, Size size=16)
void lockGLContext ()
Lock the context for the current thread and make it active.
void unlockGLContext ()
Unlock the context for the current thread and make it active.
void ignoreEvents (bool ignore)
Force the window to ignore paint events.

Protected Member Functions

void paintEvent (QPaintEvent *e)
void createTexture (const unsigned int winWidth, const unsigned int winHeight)
void deleteTexture ()
void checkGL ()
bool errorInGL (GLenum &error)
String getGLErrorString (GLenum error)

Protected Attributes

GLuint m_screenTexID
GLenum FB_TEXTURE_TARGET
GLenum FB_TEXTURE_FORMAT
GLenum FB_INTERNAL_TEXTURE_FORMAT
GLenum FB_TEXTURE_DATATYPE
Mutex contex_mutex_
bool ignore_events_
bool is_buffered_

Static Protected Attributes

static QGLFormat gl_format_

Detailed Description

Model of the RenderWindow which uses OpenGL to render its buffer to the screen.

Member Function Documentation

virtual void BALL::VIEW::GLRenderWindow::refresh ( ) [virtual]

Request that the image is actually displayed on the screen or other device the window encapsulated.

You should implement this method in subclass. This is different from RenderTarget releaseBuffer. ReleaseBuffer only informs the window that a buffer is ready, but does not imply the buffer is actually displayed somewhere. This is done by refresh. On the other hand, refresh called inbetween getBuffer and releaseBuffer has no effect.

Reimplemented from BALL::VIEW::RenderWindow< float >.

virtual bool BALL::VIEW::GLRenderWindow::resize ( const unsigned int width,
const unsigned int height
) [virtual]

Request new window size.

Returns false if such a size cannot be supplied This call must be made before the window buffer is handed out to be rendered. This precondition is being checked automatically, see getBuffer

Reimplemented from BALL::VIEW::RenderWindow< float >.


Generated on Thu Aug 6 18:30:59 2009 for BALL by doxygen 1.5.8