68 #if QT_VERSION >= 0x050000 69 Q_PLUGIN_METADATA(IID
"org.OpenFlipper.Plugins.Plugin-Render-Old-DepthPeeling")
74 void log(
Logtype _type, QString _message);
75 void log(QString _message);
83 QString
name() {
return (QString(
"Dual Depth Peeling Plugin using classic rendering pipeling")); };
84 QString
description( ) {
return (QString(tr(
"Order independent transparency renderer (classic pipeline)"))); };
87 QString version() {
return QString(
"1.0"); };
92 void initializePlugin();
97 QString rendererName();
99 QString checkOpenGL();
114 float _w = 2.0f,
float _h = 2.0f);
121 GLSL::StringList* _strFragmentShaderOut,
122 GLSL::StringList* _strGeometryShaderOut,
123 bool _textured,
bool _flatShaded,
bool _phong,
bool _vertexColor,
bool _wireFrame);
133 template <
class Action>
136 template <
class Action>
165 std::map<int, ViewerResources> viewerRes_;
177 PEEL_SHADER_WIREFRAME = 0,
178 PEEL_SHADER_HIDDENLINE = 1,
179 PEEL_SHADER_TEXTURED = 0x1,
180 PEEL_SHADER_PHONG = 0x2,
181 PEEL_SHADER_GOURAUD = 0x4,
182 PEEL_SHADER_FLAT = 0x8,
183 PEEL_SHADER_VERTEXCOLORS = 0x10,
184 PEEL_NUM_COMBINATIONS = 0x20,
185 PEEL_SHADER_NUM_FLAGS = 5
205 LIGHTTYPE_DIRECTIONAL = 0,
Logtype
Log types for Message Window.
A generic shader base class.
QString description()
Return a description of what the plugin is doing.
unsigned int rtWidth_
render target width
GLuint blendDualPeelTexID_[7]
render target textures: {depth0, depth1, front_blend0, front_blend1, back_temp0, back_temp1, back_blend}
void generatePeelingShaders(GLSL::StringList *_strVertexShaderOut, GLSL::StringList *_strFragmentShaderOut, GLSL::StringList *_strGeometryShaderOut, bool _textured, bool _flatShaded, bool _phong, bool _vertexColor, bool _wireFrame)
peel shader generator based on lights and texture mode
Interface class from which all plugins have to be created.
void destroyResources()
free all gl resources
ACG::GLState * glStateTmp_
current glState ptr for hiddenline rendering
Interface for all Plugins which do logging to the logging window of the framework.
Interface to add additional rendering functions from within plugins.
void updatePeelingShaderSet()
regenerates peeling shaders based on light nodes in scenegraph
GLuint blendQueryID_
fragment query
void traverseLightNodes(BaseNode *_node)
find all light nodes in the scene
GLSL::Shader * peelShaders_[PEEL_NUM_COMBINATIONS *3]
generated shader set
void drawScenePass(ACG::GLState *_glState, ACG::SceneGraph::DrawModes::DrawMode _drawMode, BaseNode *_sceneGraphRoot)
draw the current scene
unsigned int getPeelShaderIndex(ACG::SceneGraph::DrawModes::DrawMode _drawMode)
converts a drawmode to the correct shading program index
unsigned int rtHeight_
render target height
void drawQuadProj(float _x0=-1.0f, float _y0=1.0f, float _w=2.0f, float _h=2.0f)
draw a quad in projection space (only positions)
QString name()
Return a name for the plugin.
void reloadResources(int _viewerId)
reload gl resources
GLSL::Shader * blendShaders_[8]
shader resources
GLSL::Program * peelProgs_[PEEL_NUM_COMBINATIONS]
generates shader programs
GLuint blendDualPeelFbo_
depth peeling fbo
unsigned int glWidth_
viewer window width
LightType lightTypes_[16]
registered lights in the scene
LightType
light type enumeration
GLuint glLightIDs_[16]
matching GL light id
GLSL::Program * blendDualPeelProg_[4]
depth peeling programs
GLuint numLights_
number of used lights in the scene
unsigned int glHeight_
viewer window height