62 Q_PLUGIN_METADATA(IID
"org.OpenFlipper.Plugins.Plugin-Render-Old-DepthPeeling")
66 void log(
Logtype _type, QString _message);
67 void log(QString _message);
75 QString
name() {
return (QString(
"Dual Depth Peeling Plugin using classic rendering pipeling")); };
76 QString
description( ) {
return (QString(tr(
"Order independent transparency renderer (classic pipeline)"))); };
79 QString version() {
return QString(
"1.0"); };
84 void initializePlugin();
89 QString rendererName();
91 QString checkOpenGL();
106 float _w = 2.0f,
float _h = 2.0f);
113 GLSL::StringList* _strFragmentShaderOut,
114 GLSL::StringList* _strGeometryShaderOut,
115 bool _textured,
bool _flatShaded,
bool _phong,
bool _vertexColor,
bool _wireFrame);
125 template <
class Action>
128 template <
class Action>
157 std::map<int, ViewerResources> viewerRes_;
169 PEEL_SHADER_WIREFRAME = 0,
170 PEEL_SHADER_HIDDENLINE = 1,
171 PEEL_SHADER_TEXTURED = 0x1,
172 PEEL_SHADER_PHONG = 0x2,
173 PEEL_SHADER_GOURAUD = 0x4,
174 PEEL_SHADER_FLAT = 0x8,
175 PEEL_SHADER_VERTEXCOLORS = 0x10,
176 PEEL_NUM_COMBINATIONS = 0x20,
177 PEEL_SHADER_NUM_FLAGS = 5
197 LIGHTTYPE_DIRECTIONAL = 0,
unsigned int glHeight_
viewer window height
GLuint glLightIDs_[16]
matching GL light id
void reloadResources(int _viewerId)
reload gl resources
GLSL::Program * blendDualPeelProg_[4]
depth peeling programs
unsigned int rtWidth_
render target width
GLuint blendQueryID_
fragment query
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
Logtype
Log types for Message Window.
GLuint blendDualPeelFbo_
depth peeling fbo
LightType
light type enumeration
Interface for all Plugins which do logging to the logging window of the framework.
QString name()
Return a name for the plugin.
GLuint blendDualPeelTexID_[7]
render target textures: {depth0, depth1, front_blend0, front_blend1, back_temp0, back_temp1, back_blend}
QString description()
Return a description of what the plugin is doing.
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::Program * peelProgs_[PEEL_NUM_COMBINATIONS]
generates shader programs
void destroyResources()
free all gl resources
unsigned int glWidth_
viewer window width
GLuint numLights_
number of used lights in the scene
A generic shader base class.
GLSL::Shader * blendShaders_[8]
shader resources
void updatePeelingShaderSet()
regenerates peeling shaders based on light nodes in scenegraph
void drawScenePass(ACG::GLState *_glState, ACG::SceneGraph::DrawModes::DrawMode _drawMode, BaseNode *_sceneGraphRoot)
draw the current scene
Interface to add additional rendering functions from within plugins.
GLSL::Shader * peelShaders_[PEEL_NUM_COMBINATIONS *3]
generated shader set
unsigned int rtHeight_
render target height
ACG::GLState * glStateTmp_
current glState ptr for hiddenline rendering
void traverseLightNodes(BaseNode *_node)
find all light nodes in the scene
Interface class from which all plugins have to be created.
LightType lightTypes_[16]
registered lights in the scene
unsigned int getPeelShaderIndex(ACG::SceneGraph::DrawModes::DrawMode _drawMode)
converts a drawmode to the correct shading program index