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);
52 virtual void refresh();
55 virtual void renderText(
int x,
int y,
const String& text,
const ColorRGBA& color,
Size size = 16);
57 virtual void renderText(
float x,
float y,
float z,
const String& text,
const ColorRGBA& color,
Size size = 16);
63 void unlockGLContext();
70 {down_sampling_factor_ = dsfactor;}
74 {stereo_delta_ = delta;}
76 void setupStereo(
float eye_separation,
float focal_length);
80 {
return down_sampling_factor_;}
91 virtual void customEvent(
QEvent* evt);
93 void paintEvent(QPaintEvent* e);
107 void createTexture(
const unsigned int winWidth,
const unsigned int winHeight);
108 void deleteTexture();
112 bool errorInGL(GLenum& error);
113 String getGLErrorString(GLenum error);
125 #endif // BALL_VIEW_RENDERING_GLRENDERWINDOW_H
void setDownsamplingFactor(float dsfactor)
Set the window's downsampling factor. This is a speed up factor.
void setStereoDelta(float delta)
Set the stereo delta for raytracing in pixels.
GLenum FB_TEXTURE_DATATYPE
static QGLFormat gl_format_
GLenum FB_INTERNAL_TEXTURE_FORMAT
void ignoreEvents(bool ignore)
Force the window to ignore paint events.
float down_sampling_factor_
float getDownsamplingFactor() const
Get the window's downsampling factor.