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_;
GLSL::Program * peelBlend_
blends one depth-layer into the current scene target
void initDepthPeeling()
Allocate framebuffers and load shaders for depth-peeling.
Logtype
Log types for Message Window.
Interface for all Plugins which do logging to the logging window of the framework.
unsigned int width_
viewer window width
int maxPeelCount_
max peel count
std::map< int, ViewerResources > viewerRes_
GLSL::Program * peelBlendDual_
dual depth peeling shaders
DrawMode DEFAULT
use the default (global) draw mode and not the node's own.
void initDualDepthPeeling()
Allocate framebuffers and load shaders for dual-depth-peeling.
QString name()
Return a name for the plugin.
int peelMode_
mode: 0 -> front to back peeling, 1 -> dual peeling
Collection of framebuffers for each viewport.
QString renderObjectsInfo(bool _outputShaderInfo)
Return a qstring of the current render objects.
QAction * optionsAction()
Return options menu.
GLuint peelQueryID_
occlusion query determining end of peeling (last layer)
unsigned int height_
viewer window height
GLSL::Program * peelFinal_
final copy into back-buffer
Interface to add additional rendering functions from within plugins.
void renderDualPeeling(ACG::GLState *_glState, Viewer::ViewerProperties &_properties)
peel the scene with dual depth peeling, two layers per pass
QString description()
Return a description of what the plugin is doing.
Interface class between scenegraph and renderer.
void addRenderObject(ACG::RenderObject *_renderObject)
overide addRenderObject function to include OIT check
Interface class from which all plugins have to be created.
void renderFrontPeeling(ACG::GLState *_glState, Viewer::ViewerProperties &_properties)
peel the scene from front to back, one layer per pass