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);
GLRenderWindow(const GLRenderWindow &window, QWidget *parent_widget, const char *name=NULL, Qt::WindowFlags w_flags=0)
bool errorInGL(GLenum &error)
void createTexture(const unsigned int winWidth, const unsigned int winHeight)
void lockGLContext()
Lock the context for the current thread and make it active.
void paintEvent(QPaintEvent *e)
virtual void renderText(int x, int y, const String &text, const ColorRGBA &color, Size size=16)
void setupStereo(float eye_separation, float focal_length)
void setStereoDelta(float delta)
Set the stereo delta for raytracing in pixels.
void setDownsamplingFactor(float dsfactor)
Set the window's downsampling factor. This is a speed up factor.
virtual void customEvent(QEvent *evt)
virtual ~GLRenderWindow()
String getGLErrorString(GLenum error)
void ignoreEvents(bool ignore)
Force the window to ignore paint events.
virtual bool resize(const unsigned int width, const unsigned int height)
float getDownsamplingFactor() const
Get the window's downsampling factor.
void unlockGLContext()
Unlock the context for the current thread and make it active.
virtual void renderText(float x, float y, float z, const String &text, const ColorRGBA &color, Size size=16)
float down_sampling_factor_
GLRenderWindow(QWidget *parent_widget, const char *name=NULL, Qt::WindowFlags w_flags=0)
GLenum FB_INTERNAL_TEXTURE_FORMAT
static QGLFormat gl_format_
void safeBufferSwap()
Call swapBuffers() but first make sure the window is exposed.
GLenum FB_TEXTURE_DATATYPE