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