Go to the documentation of this file.
5 #ifndef BALL_VIEW_RENDERING_GLRENDERWINDOW_H
6 #define BALL_VIEW_RENDERING_GLRENDERWINDOW_H
8 #ifndef BALL_COMMON_GLOBAL_H
12 #ifndef BALL_DATATYPE_STRING_H
16 #ifndef BALL_VIEW_RENDERING_RENDERWINDOW_H
20 #ifndef BALL_VIEW_DATATYPE_COLORRGBA_H
24 #ifndef BALL_SYSTEM_MUTEX_H
28 #include <QtOpenGL/qgl.h>
51 virtual bool resize(
const unsigned int width,
const unsigned int height);
70 {down_sampling_factor_ = dsfactor;}
74 {stereo_delta_ = delta;}
83 {
return down_sampling_factor_;}
110 void createTexture(
const unsigned int winWidth,
const unsigned int winHeight);
128 #endif // BALL_VIEW_RENDERING_GLRENDERWINDOW_H
GLRenderWindow(const GLRenderWindow &window, QWidget *parent_widget, const char *name=NULL, Qt::WindowFlags w_flags=0)
void setupStereo(float eye_separation, float focal_length)
void lockGLContext()
Lock the context for the current thread and make it active.
void paintEvent(QPaintEvent *e)
virtual ~GLRenderWindow()
virtual bool resize(const unsigned int width, const unsigned int height)
GLenum FB_INTERNAL_TEXTURE_FORMAT
void createTexture(const unsigned int winWidth, const unsigned int winHeight)
void ignoreEvents(bool ignore)
Force the window to ignore paint events.
virtual void renderText(float x, float y, float z, const String &text, const ColorRGBA &color, Size size=16)
virtual void renderText(int x, int y, const String &text, const ColorRGBA &color, Size size=16)
float down_sampling_factor_
void setDownsamplingFactor(float dsfactor)
Set the window's downsampling factor. This is a speed up factor.
virtual void customEvent(QEvent *evt)
bool errorInGL(GLenum &error)
GLRenderWindow(QWidget *parent_widget, const char *name=NULL, Qt::WindowFlags w_flags=0)
void unlockGLContext()
Unlock the context for the current thread and make it active.
void setStereoDelta(float delta)
Set the stereo delta for raytracing in pixels.
static QGLFormat gl_format_
GLenum FB_TEXTURE_DATATYPE
float getDownsamplingFactor() const
Get the window's downsampling factor.
void safeBufferSwap()
Call swapBuffers() but first make sure the window is exposed.
String getGLErrorString(GLenum error)