54 #include <ACG/GL/IRenderer.hh>
55 #include <ACG/GL/FBO.hh>
64 #if QT_VERSION >= 0x050000
65 Q_PLUGIN_METADATA(IID
"org.OpenFlipper.Plugins.Plugin-Render-DepthPeeling")
70 void log(
Logtype _type, QString _message);
71 void log(QString _message);
78 QString
name() {
return (QString(
"DepthPeeling Plugin")); };
79 QString
description( ) {
return (QString(tr(
"DepthPeeling Rendering Pipeline (Alpha Version!)"))); };
87 QString version() {
return QString(
"1.0"); };
96 void initializePlugin();
101 QString rendererName() {
return QString(
"Alpha_Version_DepthPeeling");}
104 QString checkOpenGL();
106 void slotModeChanged( QAction * );
121 bool copyFrontDepth_;
148 void resize(
bool _dualPeeling,
unsigned int _width,
unsigned int _height);
159 GLuint singleDepthTex_[2];
160 GLuint singleFrontTex_[2];
161 GLuint singleBlendTex_;
170 GLuint dualDepthTex_[2];
171 GLuint dualFrontTex_[2];
172 GLuint dualBackTex_[2];
173 GLuint dualBlendTex_;
GLSL::Program * peelBlend_
blends one depth-layer into the current scene target
Interface class from which all plugins have to be created.
void initDualDepthPeeling()
Allocate framebuffers and load shaders for dual-depth-peeling.
int maxPeelCount_
max peel count
GLuint peelQueryID_
occlusion query determining end of peeling (last layer)
Logtype
Log types for Message Window.
DrawMode DEFAULT
use the default (global) draw mode and not the node's own.
Interface to add additional rendering functions from within plugins.
Interface class between scenegraph and renderer.
QString description()
Return a description of what the plugin is doing.
Interface for all Plugins which do logging to the logging window of the framework.
Collection of framebuffers for each viewport.
QString renderObjectsInfo(bool _outputShaderInfo)
Return a qstring of the current render objects.
int peelMode_
mode: 0 -> front to back peeling, 1 -> dual peeling
QAction * optionsAction()
Return options menu.
void renderDualPeeling(ACG::GLState *_glState, Viewer::ViewerProperties &_properties)
peel the scene with dual depth peeling, two layers per pass
GLSL::Program * peelFinal_
final copy into back-buffer
void renderFrontPeeling(ACG::GLState *_glState, Viewer::ViewerProperties &_properties)
peel the scene from front to back, one layer per pass
void initDepthPeeling()
Allocate framebuffers and load shaders for depth-peeling.
void addRenderObject(ACG::RenderObject *_renderObject)
overide addRenderObject function to include OIT check
GLSL::Program * peelBlendDual_
dual depth peeling shaders
unsigned int height_
viewer window height
QString name()
Return a name for the plugin.
std::map< int, ViewerResources > viewerRes_
unsigned int width_
viewer window width