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,
Interface class from which all plugins have to be created.
GLuint glLightIDs_[16]
matching GL light id
unsigned int rtWidth_
render target width
Logtype
Log types for Message Window.
Interface to add additional rendering functions from within plugins.
LightType
light type enumeration
unsigned int getPeelShaderIndex(ACG::SceneGraph::DrawModes::DrawMode _drawMode)
converts a drawmode to the correct shading program index
ACG::GLState * glStateTmp_
current glState ptr for hiddenline rendering
void drawScenePass(ACG::GLState *_glState, ACG::SceneGraph::DrawModes::DrawMode _drawMode, BaseNode *_sceneGraphRoot)
draw the current scene
GLuint blendQueryID_
fragment query
Interface for all Plugins which do logging to the logging window of the framework.
QString description()
Return a description of what the plugin is doing.
GLuint blendDualPeelFbo_
depth peeling fbo
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
A generic shader base class.
void reloadResources(int _viewerId)
reload gl resources
void destroyResources()
free all gl resources
GLSL::Program * peelProgs_[PEEL_NUM_COMBINATIONS]
generates shader programs
unsigned int rtHeight_
render target height
unsigned int glWidth_
viewer window width
void traverseLightNodes(BaseNode *_node)
find all light nodes in the scene
GLuint numLights_
number of used lights in the scene
QString name()
Return a name for the plugin.
LightType lightTypes_[16]
registered lights in the scene
void updatePeelingShaderSet()
regenerates peeling shaders based on light nodes in scenegraph
GLSL::Shader * blendShaders_[8]
shader resources
unsigned int glHeight_
viewer window 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)
GLSL::Shader * peelShaders_[PEEL_NUM_COMBINATIONS *3]
generated shader set
GLSL::Program * blendDualPeelProg_[4]
depth peeling programs