|
KGLLib
|
Public Slots | |
| void | setHdrRenderingActive (bool active) |
| void | setExposure (float e) |
| void | setAutoExposure (bool a) |
| void | setAutoExposureSpeed (float s) |
| void | setAutoExposureTarget (float t) |
| void | setBloomEnabled (bool e) |
| void | setBloomAfterTonemapping (bool e) |
| void | setBloomDownsize (int d) |
| void | setBloomStrength (float s) |
Public Member Functions | |
| HdrGLWidget (QWidget *parent=0, const QGLWidget *shareWidget=0, Qt::WindowFlags f=0) | |
| HdrGLWidget (QGLContext *context, QWidget *parent=0, const QGLWidget *shareWidget=0, Qt::WindowFlags f=0) | |
| HdrGLWidget (const QGLFormat &format, QWidget *parent=0, const QGLWidget *shareWidget=0, Qt::WindowFlags f=0) | |
| bool | hdrRenderingActive () const |
| bool | hdrRenderingSupported () const |
| float | exposure () const |
| bool | autoExposure () const |
| float | autoExposureSpeed () const |
| float | autoExposureTarget () const |
| bool | bloomEnabled () const |
| bool | bloomAfterTonemapping () const |
| int | bloomDownsize () const |
| float | bloomStrength () const |
| float | bloomRamp () const |
| void | render2DQuad (float width, float height) const |
| void | setupOrthoProjection (int width, int height) const |
| void | activateRenderTarget (RenderTarget *target) const |
| void | deactivateRenderTarget (RenderTarget *target) const |
| void | setDataPath (const QString &path) |
Protected Member Functions | |
| virtual void | initializeGL () |
| virtual void | initializeGL (Renderer *r) |
| virtual void | resizeGL (int width, int height) |
| virtual void | render () |
| virtual void | renderScene () |
| virtual void | hdrTonemapping () |
| virtual void | hdrBloom () |
| virtual void | calculateHdrExposure () |
| virtual float * | calculateBlurKernel (float sigma, int radius) |
| virtual Program * | generateBlurProgram (float sigma, int radius, bool horizontal) |
| virtual Shader * | generateBlurVertexShader (float sigma, int radius, bool horizontal) |
| virtual Shader * | generateBlurFragmentShader (float sigma, int radius, bool horizontal) |
| bool KGLLib::HdrGLWidget::autoExposure | ( | ) | const [inline] |
| float KGLLib::HdrGLWidget::exposure | ( | ) | const [inline] |
| bool KGLLib::HdrGLWidget::hdrRenderingActive | ( | ) | const [inline] |
Referenced by render().
| bool KGLLib::HdrGLWidget::hdrRenderingSupported | ( | ) | const [inline] |
| void KGLLib::HdrGLWidget::initializeGL | ( | ) | [protected, virtual] |
Initializes OpenGL. Base implementation:
Reimplemented from KGLLib::GLWidget.
Referenced by initializeGL().
| void KGLLib::HdrGLWidget::initializeGL | ( | Renderer * | r | ) | [protected, virtual] |
Same as above but passes the specified Renderer object to KGLLib::init().
Reimplemented from KGLLib::GLWidget.
References initializeGL().
| void KGLLib::HdrGLWidget::render | ( | ) | [protected, virtual] |
Called from paintGL() when the widget needs to be painted. This is the method that you should reimplement to do your rendering. Base implementation does nothing, so you needn't call it from your implementation.
Reimplemented from KGLLib::GLWidget.
References KGLLib::TextureBase::disable(), KGLLib::TextureBase::enable(), hdrRenderingActive(), and KGLLib::TextureBase::setFilter().
| void KGLLib::HdrGLWidget::resizeGL | ( | int | width, |
| int | height | ||
| ) | [protected, virtual] |
Called when the widget is resized. Base implementation:
Reimplemented from KGLLib::GLWidget.
| void KGLLib::HdrGLWidget::setAutoExposure | ( | bool | a | ) | [inline, slot] |
Enables or disables automatic exposure adjustment. When enabled, exposure is automatically calculated every frame after calling renderScene. Automatic exposure adjustment is disabled by default.
| void KGLLib::HdrGLWidget::setDataPath | ( | const QString & | path | ) |
Sets the data path where HdrGLWidget will look for shaders.
| void KGLLib::HdrGLWidget::setExposure | ( | float | e | ) | [inline, slot] |
Set current exposure, used for tonemapping. Default exposure is 1.0
Note that this has no effect when automatic exposure adjustment has been enabled (see setAutoExposure).
| void KGLLib::HdrGLWidget::setHdrRenderingActive | ( | bool | active | ) | [inline, slot] |
Activates or deactivates HDR rendering. Note that if HDR rendering isn't supported on current hardware then it has no effect and HDR rendering will never be active.
1.7.4