Workspace 6.21.5
|
Encapsulates the screen space layers used for rendering. More...
#include <Rendering/OpenGL/wsglscreenspacelayers.h>
Public Member Functions | |
WSGLScreenSpaceLayers (int numLayers) | |
virtual | ~WSGLScreenSpaceLayers () |
QOpenGLFramebufferObject & | addExtraFramebufferObject (const QString &id, const QOpenGLFramebufferObjectFormat &format) |
QOpenGLFramebufferObject & | addExtraFramebufferObject (const QString &id, QOpenGLFramebufferObject::Attachment attachment) |
bool | bindLayer (int layerNumber) |
void | bindScreenFramebuffer () |
bool | completeLayer (int layerNumber) |
bool | flattenLayers (Camera &camera, const Mesh::BoundingBox &sceneExtent) |
const QColor & | getBackgroundColor () const |
const WSGLTexture * | getCurrentDepthTexture () const |
GLuint | getCurrentLayerFboHandle () const |
QOpenGLFramebufferObject * | getExtraFramebufferObject (const QString &id) |
bool | getFaceCullingEnabled () const |
bool | getLayerCaptureEnabled () const |
int | getNumLayers () |
int | getNumSamples () |
GLuint | getScreenFramebufferHandle () |
WSGLScreenSpaceAmbientOcclusion & | getScreenSpaceAmbientOcclusion () |
bool | getSsaoEnabled () const |
bool | getSsaoSpecularEnabled () const |
bool | initialize (WSGLContext &context) |
bool | isInitialized () const |
bool | overlayFramebufferObject (const QOpenGLFramebufferObject &fbo) |
bool | overlayFullScreenTexture (GLuint textureId) |
void | releaseExtraFramebufferObject (const QString &id) |
bool | renderFullScreenEffect (WSGLShaderProgram &shader, GLuint transformUniformLocation, bool blend) |
bool | renderPlaceholderImage () |
bool | resize () |
bool | resizeRequired () const |
void | setBackgroundColor (const QColor &color) |
void | setFaceCullingEnabled (bool b) |
bool | setLayerCaptureEnabled (bool enable) |
void | setNumLayers (int numLayers) |
void | setNumSamples (int samples) |
void | setScreenFramebufferHandle (GLuint handle) |
bool | setSize (int viewportWidth, int viewportHeight) |
void | setSsaoEnabled (bool enable) |
void | setSsaoSpecularEnabled (bool enable) |
Static Public Attributes | |
static const int | MAX_DEPTH_LAYERS = 8 |
static const unsigned | TEXCOORD_ATTRIB_LOCATION = 1 |
static const unsigned | VERTEX_ATTRIB_LOCATION = 0 |
The WSGLRenderer can do multiple passes of a Scene's geometry, writing the results to different 'layers' in screen space. Each of these layers can be used to achieve different effects, such as depth-peeling or screen-space-ambient-occlusion.
WSGLScreenSpaceLayers | ( | int | numLayers | ) |
|
virtual |
QOpenGLFramebufferObject & addExtraFramebufferObject | ( | const QString & | id, |
const QOpenGLFramebufferObjectFormat & | format | ||
) |
id | The unique identifier to associate with the framebuffer object. |
format |
QOpenGLFramebufferObject & addExtraFramebufferObject | ( | const QString & | id, |
QOpenGLFramebufferObject::Attachment | attachment | ||
) |
id | The unique identifier of the FBO to create. |
attachment | The type of buffers to attach to the new FBO |
bool bindLayer | ( | int | layerNumber | ) |
void bindScreenFramebuffer | ( | ) |
Binds the framebuffer being used as the screen.
bool completeLayer | ( | int | layerNumber | ) |
bool flattenLayers | ( | Camera & | camera, |
const Mesh::BoundingBox & | sceneExtent | ||
) |
const QColor & getBackgroundColor | ( | ) | const |
const WSGLTexture * getCurrentDepthTexture | ( | ) | const |
GLuint getCurrentLayerFboHandle | ( | ) | const |
QOpenGLFramebufferObject * getExtraFramebufferObject | ( | const QString & | id | ) |
bool getFaceCullingEnabled | ( | ) | const |
bool getLayerCaptureEnabled | ( | ) | const |
int getNumLayers | ( | ) |
int getNumSamples | ( | ) |
GLuint getScreenFramebufferHandle | ( | ) |
WSGLScreenSpaceAmbientOcclusion & getScreenSpaceAmbientOcclusion | ( | ) |
bool getSsaoEnabled | ( | ) | const |
bool getSsaoSpecularEnabled | ( | ) | const |
bool initialize | ( | WSGLContext & | context | ) |
bool isInitialized | ( | ) | const |
bool overlayFramebufferObject | ( | const QOpenGLFramebufferObject & | fbo | ) |
bool overlayFullScreenTexture | ( | GLuint | textureId | ) |
textureId | The ID of the texture to overlay. Is assumed to be screen sized. |
void releaseExtraFramebufferObject | ( | const QString & | id | ) |
bool renderFullScreenEffect | ( | WSGLShaderProgram & | shader, |
GLuint | transformUniformLocation, | ||
bool | blend | ||
) |
bool renderPlaceholderImage | ( | ) |
bool resize | ( | ) |
bool resizeRequired | ( | ) | const |
void setBackgroundColor | ( | const QColor & | color | ) |
void setFaceCullingEnabled | ( | bool | b | ) |
b | Set to true to notify the SSL class that face culling is enabled, false otherwise. |
bool setLayerCaptureEnabled | ( | bool | enable | ) |
void setNumLayers | ( | int | numLayers | ) |
numLayers | The number of layers to use when depth peeling. |
void setNumSamples | ( | int | samples | ) |
void setScreenFramebufferHandle | ( | GLuint | handle | ) |
handle |
bool setSize | ( | int | viewportWidth, |
int | viewportHeight | ||
) |
void setSsaoEnabled | ( | bool | enable | ) |
void setSsaoSpecularEnabled | ( | bool | enable | ) |
|
static |
|
static |
|
static |