Commit 8ebb6d0f authored by Marlin Frickenschmidt's avatar Marlin Frickenschmidt

Shaders can now be properly activated and deactivated again in the...

Shaders can now be properly activated and deactivated again in the shaderWidget. Removed a lot of redundant/useless code from ViewControlPlugin shader handling and updated ShaderNode such that shaders may now also be disabled for a given drawMode.

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@10382 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 1b01cc54
This diff is collapsed.
......@@ -182,6 +182,15 @@ class ViewControlPlugin : public QObject, BaseInterface , PickingInterface, Logg
/// Allows to enable/disable visualization of the objects modeling area for meshes
void showModelingAreas( int _id , bool _state );
/** Disable the given shader for a given object and draw mode.
* @param _objectId ID of the object for which to disable the shader
* @param _drawMode _drawMode for which the shader is disabled
* @param _shader Shader which is disabled. If this shader is not currently active for
* the given _drawMode, nothing will be disabled. In order to disable
* all shaders for the given _drawMode, use _shader=0 (default).
*/
void disableShader(int _objectId, ACG::SceneGraph::DrawModes::DrawMode _drawMode, ShaderInfo* _shader=0);
/** Sets a shader for the object and the given drawMode( can be a combination of draw modes )
* @param _id Object Id
* @param _drawMode ; seperated list of drawmodes used by the shader
......@@ -190,8 +199,7 @@ class ViewControlPlugin : public QObject, BaseInterface , PickingInterface, Logg
* @param _pickVertexShader File with the picking vertex shader code
* @param _pickFragmentShader File with the picking fragment shader code
*/
void setShader(int _id, QString _drawMode, QString _vertexShader, QString _fragmentShader,
QString _pickVertexShader = "", QString _pickFragmentShader = "");
void setShader(int _id, ACG::SceneGraph::DrawModes::DrawMode _drawMode, ShaderInfo _shader);
/** Sets a Shader from the Shader directory of OpenFlipper ( Name of the one given inside the ini file )
*
......@@ -218,7 +226,7 @@ class ViewControlPlugin : public QObject, BaseInterface , PickingInterface, Logg
/// translate Scene
void translate( Vector _vec , int _viewer = PluginFunctions::ALL_VIEWERS );
/// Set the draw mode for a viewer
void setDrawMode(QString _mode, int _viewer = PluginFunctions::ALL_VIEWERS );
......
......@@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
<string>Shader Settings</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="2" column="2">
......@@ -42,13 +42,6 @@
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="setGlobalButton">
<property name="text">
<string>Set shader Globally</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="setShaderButton">
<property name="text">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment