Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
1e018595
Commit
1e018595
authored
Jan 05, 2011
by
Sebastian Eichelbaum
Browse files
[CHANGE] - renamed WShader to WGEShader to match naming scheme of GE
parent
2a4f9e23
Changes
43
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
74 additions
and
74 deletions
+74
-74
src/graphicsEngine/WGEOffscreenRenderNode.cpp
src/graphicsEngine/WGEOffscreenRenderNode.cpp
+3
-3
src/graphicsEngine/WGEOffscreenRenderNode.h
src/graphicsEngine/WGEOffscreenRenderNode.h
+4
-4
src/graphicsEngine/WGEShader.cpp
src/graphicsEngine/WGEShader.cpp
+25
-25
src/graphicsEngine/WGEShader.h
src/graphicsEngine/WGEShader.h
+9
-9
src/kernel/modules/navSlices/WMNavSlices.cpp
src/kernel/modules/navSlices/WMNavSlices.cpp
+2
-2
src/kernel/modules/navSlices/WMNavSlices.h
src/kernel/modules/navSlices/WMNavSlices.h
+2
-2
src/modules/arbitraryPlane/WMArbitraryPlane.cpp
src/modules/arbitraryPlane/WMArbitraryPlane.cpp
+2
-2
src/modules/arbitraryPlane/WMArbitraryPlane.h
src/modules/arbitraryPlane/WMArbitraryPlane.h
+1
-1
src/modules/coordinateHUD/WMCoordinateHUD.cpp
src/modules/coordinateHUD/WMCoordinateHUD.cpp
+1
-1
src/modules/coordinateHUD/WMCoordinateHUD.h
src/modules/coordinateHUD/WMCoordinateHUD.h
+2
-2
src/modules/coordinateSystem/WMCoordinateSystem.h
src/modules/coordinateSystem/WMCoordinateSystem.h
+1
-1
src/modules/directVolumeRendering/WMDirectVolumeRendering.cpp
...modules/directVolumeRendering/WMDirectVolumeRendering.cpp
+2
-2
src/modules/directVolumeRendering/WMDirectVolumeRendering.h
src/modules/directVolumeRendering/WMDirectVolumeRendering.h
+2
-2
src/modules/fiberDisplay/WMFiberDisplay.cpp
src/modules/fiberDisplay/WMFiberDisplay.cpp
+2
-2
src/modules/fiberDisplay/WMFiberDisplay.h
src/modules/fiberDisplay/WMFiberDisplay.h
+3
-3
src/modules/fiberDisplaySimple/WMFiberDisplaySimple.cpp
src/modules/fiberDisplaySimple/WMFiberDisplaySimple.cpp
+2
-2
src/modules/fiberDisplaySimple/WMFiberDisplaySimple.h
src/modules/fiberDisplaySimple/WMFiberDisplaySimple.h
+2
-2
src/modules/imageSpaceLIC/WMImageSpaceLIC.cpp
src/modules/imageSpaceLIC/WMImageSpaceLIC.cpp
+5
-5
src/modules/isosurfaceRaytracer/WMIsosurfaceRaytracer.cpp
src/modules/isosurfaceRaytracer/WMIsosurfaceRaytracer.cpp
+2
-2
src/modules/isosurfaceRaytracer/WMIsosurfaceRaytracer.h
src/modules/isosurfaceRaytracer/WMIsosurfaceRaytracer.h
+2
-2
No files found.
src/graphicsEngine/WGEOffscreenRenderNode.cpp
View file @
1e018595
...
...
@@ -65,7 +65,7 @@ osg::ref_ptr< WGEOffscreenTexturePass > WGEOffscreenRenderNode::addTextureProces
return
pass
;
}
osg
::
ref_ptr
<
WGEOffscreenRenderPass
>
WGEOffscreenRenderNode
::
addGeometryRenderPass
(
osg
::
ref_ptr
<
osg
::
Node
>
node
,
osg
::
ref_ptr
<
WShader
>
shader
,
osg
::
ref_ptr
<
WGEOffscreenRenderPass
>
WGEOffscreenRenderNode
::
addGeometryRenderPass
(
osg
::
ref_ptr
<
osg
::
Node
>
node
,
osg
::
ref_ptr
<
W
GE
Shader
>
shader
,
std
::
string
name
)
{
// create a plain render pass and add some geometry
...
...
@@ -75,7 +75,7 @@ osg::ref_ptr< WGEOffscreenRenderPass > WGEOffscreenRenderNode::addGeometryRender
return
pass
;
}
osg
::
ref_ptr
<
WGEOffscreenTexturePass
>
WGEOffscreenRenderNode
::
addTextureProcessingPass
(
osg
::
ref_ptr
<
WShader
>
shader
,
std
::
string
name
)
osg
::
ref_ptr
<
WGEOffscreenTexturePass
>
WGEOffscreenRenderNode
::
addTextureProcessingPass
(
osg
::
ref_ptr
<
W
GE
Shader
>
shader
,
std
::
string
name
)
{
osg
::
ref_ptr
<
WGEOffscreenTexturePass
>
pass
=
addRenderPass
<
WGEOffscreenTexturePass
>
(
name
);
shader
->
apply
(
pass
);
...
...
@@ -88,7 +88,7 @@ osg::ref_ptr< WGEOffscreenFinalPass > WGEOffscreenRenderNode::addFinalOnScreenPa
return
pass
;
}
osg
::
ref_ptr
<
WGEOffscreenFinalPass
>
WGEOffscreenRenderNode
::
addFinalOnScreenPass
(
osg
::
ref_ptr
<
WShader
>
shader
,
std
::
string
name
)
osg
::
ref_ptr
<
WGEOffscreenFinalPass
>
WGEOffscreenRenderNode
::
addFinalOnScreenPass
(
osg
::
ref_ptr
<
W
GE
Shader
>
shader
,
std
::
string
name
)
{
osg
::
ref_ptr
<
WGEOffscreenFinalPass
>
pass
=
addRenderPass
<
WGEOffscreenFinalPass
>
(
name
);
shader
->
apply
(
pass
);
...
...
src/graphicsEngine/WGEOffscreenRenderNode.h
View file @
1e018595
...
...
@@ -34,7 +34,7 @@
#include "WGEOffscreenTexturePass.h"
#include "WGEOffscreenFinalPass.h"
#include "WGETextureHud.h"
#include "WShader.h"
#include "W
GE
Shader.h"
#include "callbacks/WGEViewportCallback.h"
#include "WExportWGE.h"
...
...
@@ -101,7 +101,7 @@ public:
*
* \return the geometry render pass.
*/
virtual
osg
::
ref_ptr
<
WGEOffscreenRenderPass
>
addGeometryRenderPass
(
osg
::
ref_ptr
<
osg
::
Node
>
node
,
osg
::
ref_ptr
<
WShader
>
shader
,
virtual
osg
::
ref_ptr
<
WGEOffscreenRenderPass
>
addGeometryRenderPass
(
osg
::
ref_ptr
<
osg
::
Node
>
node
,
osg
::
ref_ptr
<
W
GE
Shader
>
shader
,
std
::
string
name
=
"Unnamed"
);
/**
...
...
@@ -127,7 +127,7 @@ public:
*
* \return the texture processing pass created.
*/
virtual
osg
::
ref_ptr
<
WGEOffscreenTexturePass
>
addTextureProcessingPass
(
osg
::
ref_ptr
<
WShader
>
shader
,
std
::
string
name
=
"Unnamed"
);
virtual
osg
::
ref_ptr
<
WGEOffscreenTexturePass
>
addTextureProcessingPass
(
osg
::
ref_ptr
<
W
GE
Shader
>
shader
,
std
::
string
name
=
"Unnamed"
);
/**
* Creates a new render pass which can be seen as put-textures-back-on-screen-pass. It renders a full-screen quad to the on-screen
...
...
@@ -148,7 +148,7 @@ public:
*
* \return the on-screen render pass which draws processed textures back on screen.
*/
virtual
osg
::
ref_ptr
<
WGEOffscreenFinalPass
>
addFinalOnScreenPass
(
osg
::
ref_ptr
<
WShader
>
shader
,
std
::
string
name
=
"Unnamed"
);
virtual
osg
::
ref_ptr
<
WGEOffscreenFinalPass
>
addFinalOnScreenPass
(
osg
::
ref_ptr
<
W
GE
Shader
>
shader
,
std
::
string
name
=
"Unnamed"
);
/**
* Creates a new offscreen-render-pass coupled with the reference camera. This pass actually does nothing. The method is useful for custom
...
...
src/graphicsEngine/WShader.cpp
→
src/graphicsEngine/W
GE
Shader.cpp
View file @
1e018595
...
...
@@ -41,9 +41,9 @@
#include "../common/WLogger.h"
#include "../common/WPathHelper.h"
#include "WShader.h"
#include "W
GE
Shader.h"
WShader
::
WShader
(
std
::
string
name
,
boost
::
filesystem
::
path
search
)
:
W
GE
Shader
::
W
GE
Shader
(
std
::
string
name
,
boost
::
filesystem
::
path
search
)
:
osg
::
Program
(),
m_shaderPath
(
search
),
m_name
(
name
),
...
...
@@ -61,16 +61,16 @@ WShader::WShader( std::string name, boost::filesystem::path search ):
addShader
(
m_fragmentShader
);
addShader
(
m_geometryShader
);
m_reloadSignalConnection
=
WGraphicsEngine
::
getGraphicsEngine
()
->
subscribeSignal
(
GE_RELOADSHADERS
,
boost
::
bind
(
&
WShader
::
reload
,
this
)
);
m_reloadSignalConnection
=
WGraphicsEngine
::
getGraphicsEngine
()
->
subscribeSignal
(
GE_RELOADSHADERS
,
boost
::
bind
(
&
W
GE
Shader
::
reload
,
this
)
);
}
WShader
::~
WShader
()
W
GE
Shader
::~
W
GE
Shader
()
{
// cleanup
m_reloadSignalConnection
.
disconnect
();
}
void
WShader
::
apply
(
osg
::
ref_ptr
<
osg
::
Node
>
node
)
void
W
GE
Shader
::
apply
(
osg
::
ref_ptr
<
osg
::
Node
>
node
)
{
// set the shader attribute
// NOTE: the attribute is protected to avoid father nodes overwriting it
...
...
@@ -83,13 +83,13 @@ void WShader::apply( osg::ref_ptr< osg::Node > node )
node
->
addUpdateCallback
(
osg
::
ref_ptr
<
SafeUpdaterCallback
>
(
new
SafeUpdaterCallback
(
this
)
)
);
}
void
WShader
::
applyDirect
(
osg
::
State
&
state
)
// NOLINT <- ensure this matches the official OSG API by using a non-const ref
void
W
GE
Shader
::
applyDirect
(
osg
::
State
&
state
)
// NOLINT <- ensure this matches the official OSG API by using a non-const ref
{
updatePrograms
();
osg
::
Program
::
apply
(
state
);
}
void
WShader
::
deactivate
(
osg
::
ref_ptr
<
osg
::
Node
>
node
)
void
W
GE
Shader
::
deactivate
(
osg
::
ref_ptr
<
osg
::
Node
>
node
)
{
// set the shader attribute
// NOTE: the attribute is protected to avoid father nodes overwriting it
...
...
@@ -103,12 +103,12 @@ void WShader::deactivate( osg::ref_ptr< osg::Node > node )
node
->
addUpdateCallback
(
osg
::
ref_ptr
<
SafeUpdaterCallback
>
(
new
SafeUpdaterCallback
(
this
)
)
);
}
void
WShader
::
reload
()
void
W
GE
Shader
::
reload
()
{
m_reload
=
true
;
}
void
WShader
::
reloadShader
()
void
W
GE
Shader
::
reloadShader
()
{
try
{
...
...
@@ -119,7 +119,7 @@ void WShader::reloadShader()
// reload the sources and set the shader
// vertex shader
WLogger
::
getLogger
()
->
addLogMessage
(
"Reloading vertex shader
\"
"
+
m_name
+
"-vertex.glsl
\"
"
,
"WShader"
,
LL_DEBUG
);
WLogger
::
getLogger
()
->
addLogMessage
(
"Reloading vertex shader
\"
"
+
m_name
+
"-vertex.glsl
\"
"
,
"W
GE
Shader"
,
LL_DEBUG
);
std
::
string
source
=
processShader
(
m_name
+
"-vertex.glsl"
);
if
(
source
!=
""
)
{
...
...
@@ -128,7 +128,7 @@ void WShader::reloadShader()
}
// fragment shader
WLogger
::
getLogger
()
->
addLogMessage
(
"Reloading fragment shader
\"
"
+
m_name
+
"-fragment.glsl
\"
"
,
"WShader"
,
LL_DEBUG
);
WLogger
::
getLogger
()
->
addLogMessage
(
"Reloading fragment shader
\"
"
+
m_name
+
"-fragment.glsl
\"
"
,
"W
GE
Shader"
,
LL_DEBUG
);
source
=
processShader
(
m_name
+
"-fragment.glsl"
);
if
(
source
!=
""
)
{
...
...
@@ -137,7 +137,7 @@ void WShader::reloadShader()
}
// Geometry Shader
WLogger
::
getLogger
()
->
addLogMessage
(
"Reloading geometry shader
\"
"
+
m_name
+
"-geometry.glsl
\"
"
,
"WShader"
,
LL_DEBUG
);
WLogger
::
getLogger
()
->
addLogMessage
(
"Reloading geometry shader
\"
"
+
m_name
+
"-geometry.glsl
\"
"
,
"W
GE
Shader"
,
LL_DEBUG
);
source
=
processShader
(
m_name
+
"-geometry.glsl"
,
true
);
if
(
source
!=
""
)
{
...
...
@@ -151,7 +151,7 @@ void WShader::reloadShader()
{
m_shaderLoaded
=
false
;
WLogger
::
getLogger
()
->
addLogMessage
(
"Problem loading shader."
,
"WShader"
,
LL_ERROR
);
WLogger
::
getLogger
()
->
addLogMessage
(
"Problem loading shader."
,
"W
GE
Shader"
,
LL_ERROR
);
// clean up the mess
removeShader
(
m_vertexShader
);
...
...
@@ -163,7 +163,7 @@ void WShader::reloadShader()
m_reload
=
false
;
}
void
WShader
::
updatePrograms
()
void
W
GE
Shader
::
updatePrograms
()
{
// is it needed to do something here?
if
(
m_deactivated
)
...
...
@@ -179,12 +179,12 @@ void WShader::updatePrograms()
}
}
WShader
::
SafeUpdaterCallback
::
SafeUpdaterCallback
(
WShader
*
shader
)
:
W
GE
Shader
::
SafeUpdaterCallback
::
SafeUpdaterCallback
(
W
GE
Shader
*
shader
)
:
m_shader
(
shader
)
{
}
void
WShader
::
SafeUpdaterCallback
::
operator
()(
osg
::
Node
*
node
,
osg
::
NodeVisitor
*
nv
)
void
W
GE
Shader
::
SafeUpdaterCallback
::
operator
()(
osg
::
Node
*
node
,
osg
::
NodeVisitor
*
nv
)
{
m_shader
->
updatePrograms
();
...
...
@@ -192,7 +192,7 @@ void WShader::SafeUpdaterCallback::operator()( osg::Node* node, osg::NodeVisitor
traverse
(
node
,
nv
);
}
std
::
string
WShader
::
processShader
(
const
std
::
string
filename
,
bool
optional
,
int
level
)
std
::
string
W
GE
Shader
::
processShader
(
const
std
::
string
filename
,
bool
optional
,
int
level
)
{
std
::
stringstream
output
;
// processed output
...
...
@@ -213,7 +213,7 @@ std::string WShader::processShader( const std::string filename, bool optional, i
// reached a certain level. This normally denotes a inclusion cycle.
// We do not throw an exception here to avoid OSG to crash.
WLogger
::
getLogger
()
->
addLogMessage
(
"Inclusion depth is too large. Maybe there is a inclusion cycle in the shader code."
,
"WShader ("
+
filename
+
")"
,
LL_ERROR
"W
GE
Shader ("
+
filename
+
")"
,
LL_ERROR
);
// just return unprocessed source
...
...
@@ -253,7 +253,7 @@ std::string WShader::processShader( const std::string filename, bool optional, i
{
WLogger
::
getLogger
()
->
addLogMessage
(
"The requested shader
\"
"
+
filename
+
"
\"
does not exist in
\"
"
+
m_shaderPath
.
file_string
()
+
"
\"
,
\"
"
+
(
m_shaderPath
/
"shaders"
).
file_string
()
+
"
\"
or
\"
"
+
WPathHelper
::
getShaderPath
().
file_string
()
+
"
\"
."
,
"WShader ("
+
filename
+
")"
,
LL_ERROR
WPathHelper
::
getShaderPath
().
file_string
()
+
"
\"
."
,
"W
GE
Shader ("
+
filename
+
")"
,
LL_ERROR
);
return
""
;
...
...
@@ -275,13 +275,13 @@ std::string WShader::processShader( const std::string filename, bool optional, i
if
(
level
==
0
)
{
WLogger
::
getLogger
()
->
addLogMessage
(
"Can't open shader file
\"
"
+
filename
+
"
\"
."
,
"WShader ("
+
filename
+
")"
,
LL_ERROR
"W
GE
Shader ("
+
filename
+
")"
,
LL_ERROR
);
}
else
{
WLogger
::
getLogger
()
->
addLogMessage
(
"Can't open shader file for inclusion
\"
"
+
filename
+
"
\"
."
,
"WShader ("
+
filename
+
")"
,
LL_ERROR
"W
GE
Shader ("
+
filename
+
")"
,
LL_ERROR
);
}
...
...
@@ -307,7 +307,7 @@ std::string WShader::processShader( const std::string filename, bool optional, i
if
(
foundVersion
)
{
WLogger
::
getLogger
()
->
addLogMessage
(
"Multiple version statements in shader file
\"
"
+
fn
+
"
\"
."
,
"WShader ("
+
filename
+
")"
,
LL_ERROR
"W
GE
Shader ("
+
filename
+
")"
,
LL_ERROR
);
return
""
;
}
...
...
@@ -336,19 +336,19 @@ std::string WShader::processShader( const std::string filename, bool optional, i
return
vs
.
str
();
}
void
WShader
::
eraseDefine
(
std
::
string
key
)
void
W
GE
Shader
::
eraseDefine
(
std
::
string
key
)
{
m_defines
.
erase
(
key
);
m_reload
=
true
;
}
void
WShader
::
eraseAllDefines
()
void
W
GE
Shader
::
eraseAllDefines
()
{
m_defines
.
clear
();
m_reload
=
true
;
}
void
WShader
::
setDefine
(
std
::
string
key
)
void
W
GE
Shader
::
setDefine
(
std
::
string
key
)
{
this
->
setDefine
(
key
,
"Defined"
);
}
...
...
src/graphicsEngine/WShader.h
→
src/graphicsEngine/W
GE
Shader.h
View file @
1e018595
...
...
@@ -22,8 +22,8 @@
//
//---------------------------------------------------------------------------
#ifndef WSHADER_H
#define WSHADER_H
#ifndef W
GE
SHADER_H
#define W
GE
SHADER_H
#include <map>
#include <string>
...
...
@@ -40,7 +40,7 @@
/**
* Class encapsulating the OSG Program class for a more convenient way of adding and modifying shader.
*/
class
WGE_EXPORT
WShader
:
public
osg
::
Program
class
WGE_EXPORT
W
GE
Shader
:
public
osg
::
Program
{
public:
...
...
@@ -51,12 +51,12 @@ public:
* \param name the name of the shader. It gets searched in the shader path.
* \param search the local search path. If not specified, the global shader path is used.
*/
WShader
(
std
::
string
name
,
boost
::
filesystem
::
path
search
=
WPathHelper
::
getShaderPath
()
);
W
GE
Shader
(
std
::
string
name
,
boost
::
filesystem
::
path
search
=
WPathHelper
::
getShaderPath
()
);
/**
* Destructor.
*/
virtual
~
WShader
();
virtual
~
W
GE
Shader
();
/**
* Apply this shader to the specified node. Use this method to ensure, that reload events can be handled properly during the
...
...
@@ -202,7 +202,7 @@ protected:
*
* \param shader the shader which needs to be updated.
*/
explicit
SafeUpdaterCallback
(
WShader
*
shader
);
explicit
SafeUpdaterCallback
(
W
GE
Shader
*
shader
);
/**
* Callback method called by the NodeVisitor when visiting a node.
...
...
@@ -219,14 +219,14 @@ protected:
/**
* The shader belonging to the node currently getting updated.
*/
WShader
*
m_shader
;
W
GE
Shader
*
m_shader
;
};
private:
};
template
<
typename
T
>
void
WShader
::
setDefine
(
std
::
string
key
,
T
value
)
void
W
GE
Shader
::
setDefine
(
std
::
string
key
,
T
value
)
{
if
(
key
.
length
()
>
0
)
{
...
...
@@ -235,5 +235,5 @@ void WShader::setDefine( std::string key, T value )
}
}
#endif // WSHADER_H
#endif // W
GE
SHADER_H
src/kernel/modules/navSlices/WMNavSlices.cpp
View file @
1e018595
...
...
@@ -48,7 +48,7 @@
#include "../../../dataHandler/WGridRegular3D.h"
#include "../../../dataHandler/WSubject.h"
#include "../../../dataHandler/WValueSet.h"
#include "../../../graphicsEngine/WShader.h"
#include "../../../graphicsEngine/W
GE
Shader.h"
#include "../../../graphicsEngine/WGraphicsEngine.h"
#include "../../../graphicsEngine/WGEUtils.h"
#include "../../WKernel.h"
...
...
@@ -72,7 +72,7 @@ WMNavSlices::WMNavSlices():
// Implement WModule::initializeConnectors instead.
// initialize members
m_shader
=
osg
::
ref_ptr
<
WShader
>
(
new
WShader
(
"WMNavSlices"
)
);
m_shader
=
osg
::
ref_ptr
<
W
GE
Shader
>
(
new
W
GE
Shader
(
"WMNavSlices"
)
);
}
WMNavSlices
::~
WMNavSlices
()
...
...
src/kernel/modules/navSlices/WMNavSlices.h
View file @
1e018595
...
...
@@ -33,7 +33,7 @@
#include <osg/Node>
#include "../../../dataHandler/WDataSet.h"
#include "../../../graphicsEngine/WShader.h"
#include "../../../graphicsEngine/W
GE
Shader.h"
#include "../../../graphicsEngine/WGEGroupNode.h"
#include "../../../graphicsEngine/WPickInfo.h"
#include "../../WModule.h"
...
...
@@ -297,7 +297,7 @@ private:
/**
* the shader object for this module
*/
osg
::
ref_ptr
<
WShader
>
m_shader
;
osg
::
ref_ptr
<
W
GE
Shader
>
m_shader
;
/**
* lock to prevent concurrent threads trying to update the osg node
...
...
src/modules/arbitraryPlane/WMArbitraryPlane.cpp
View file @
1e018595
...
...
@@ -35,7 +35,7 @@
#include "../../dataHandler/WGridRegular3D.h"
#include "../../dataHandler/WSubject.h"
#include "../../dataHandler/WValueSet.h"
#include "../../graphicsEngine/WShader.h"
#include "../../graphicsEngine/W
GE
Shader.h"
#include "../../graphicsEngine/WGEUtils.h"
...
...
@@ -108,7 +108,7 @@ void WMArbitraryPlane::properties()
void
WMArbitraryPlane
::
moduleMain
()
{
m_shader
=
osg
::
ref_ptr
<
WShader
>
(
new
WShader
(
"WMArbitraryPlane"
,
m_localPath
)
);
m_shader
=
osg
::
ref_ptr
<
W
GE
Shader
>
(
new
W
GE
Shader
(
"WMArbitraryPlane"
,
m_localPath
)
);
initPlane
();
...
...
src/modules/arbitraryPlane/WMArbitraryPlane.h
View file @
1e018595
...
...
@@ -224,7 +224,7 @@ private:
/**
* the shader object for this module
*/
osg
::
ref_ptr
<
WShader
>
m_shader
;
osg
::
ref_ptr
<
W
GE
Shader
>
m_shader
;
/**
* vector of uniforms for type of texture
...
...
src/modules/coordinateHUD/WMCoordinateHUD.cpp
View file @
1e018595
...
...
@@ -104,7 +104,7 @@ void WMCoordinateHUD::properties()
void
WMCoordinateHUD
::
moduleMain
()
{
// added own shader for visualisation as HUD
m_shader
=
osg
::
ref_ptr
<
WShader
>
(
new
WShader
(
"WMCoordinateHUD"
,
m_localPath
)
);
m_shader
=
osg
::
ref_ptr
<
W
GE
Shader
>
(
new
W
GE
Shader
(
"WMCoordinateHUD"
,
m_localPath
)
);
m_rootNode
=
new
WGEManagedGroupNode
(
m_active
);
m_rootNode
->
setName
(
"coordHUDNode"
);
...
...
src/modules/coordinateHUD/WMCoordinateHUD.h
View file @
1e018595
...
...
@@ -34,7 +34,7 @@
#include "../../graphicsEngine/WGEManagedGroupNode.h"
#include "../../graphicsEngine/WGEZoomTrackballManipulator.h"
#include "../../graphicsEngine/WShader.h"
#include "../../graphicsEngine/W
GE
Shader.h"
#include "../../kernel/WModule.h"
#include "../../kernel/WModuleInputData.h"
...
...
@@ -151,7 +151,7 @@ class WMCoordinateHUD: public WModule, public osg::Referenced
/**
* the shader
*/
osg
::
ref_ptr
<
WShader
>
m_shader
;
osg
::
ref_ptr
<
W
GE
Shader
>
m_shader
;
/**
* A condition used to notify about changes in several properties.
...
...
src/modules/coordinateSystem/WMCoordinateSystem.h
View file @
1e018595
...
...
@@ -205,7 +205,7 @@ private:
/**
* the shader object for this module
*/
// boost::shared_ptr< WShader >m_shader;
// boost::shared_ptr< W
GE
Shader >m_shader;
/**
* update function, called with each update pass of the osg render loop
...
...
src/modules/directVolumeRendering/WMDirectVolumeRendering.cpp
View file @
1e018595
...
...
@@ -40,7 +40,7 @@
#include "../../graphicsEngine/WGEGeodeUtils.h"
#include "../../graphicsEngine/WGEManagedGroupNode.h"
#include "../../graphicsEngine/WGEUtils.h"
#include "../../graphicsEngine/WShader.h"
#include "../../graphicsEngine/W
GE
Shader.h"
#include "../../graphicsEngine/WGERequirement.h"
#include "../../kernel/WKernel.h"
#include "WMDirectVolumeRendering.xpm"
...
...
@@ -171,7 +171,7 @@ osg::ref_ptr< osg::Image > genWhiteNoise( size_t resX )
void
WMDirectVolumeRendering
::
moduleMain
()
{
m_shader
=
osg
::
ref_ptr
<
WShader
>
(
new
WShader
(
"WMDirectVolumeRendering"
,
m_localPath
)
);
m_shader
=
osg
::
ref_ptr
<
W
GE
Shader
>
(
new
W
GE
Shader
(
"WMDirectVolumeRendering"
,
m_localPath
)
);
// let the main loop awake if the data changes or the properties changed.
m_moduleState
.
setResetable
(
true
,
true
);
...
...
src/modules/directVolumeRendering/WMDirectVolumeRendering.h
View file @
1e018595
...
...
@@ -30,7 +30,7 @@
#include <osg/Node>
#include <osg/Uniform>
#include "../../graphicsEngine/WShader.h"
#include "../../graphicsEngine/W
GE
Shader.h"
#include "../../dataHandler/WDataSetScalar.h"
#include "../../dataHandler/WDataSetVector.h"
#include "../../kernel/WModule.h"
...
...
@@ -184,7 +184,7 @@ private:
/**
* the DVR shader.
*/
osg
::
ref_ptr
<
WShader
>
m_shader
;
osg
::
ref_ptr
<
W
GE
Shader
>
m_shader
;
/**
* Class handling uniform update during render traversal
...
...
src/modules/fiberDisplay/WMFiberDisplay.cpp
View file @
1e018595
...
...
@@ -184,8 +184,8 @@ void WMFiberDisplay::properties()
void
WMFiberDisplay
::
moduleMain
()
{
// setup shaders
m_shaderTubes
=
osg
::
ref_ptr
<
WShader
>
(
new
WShader
(
"WMFiberDisplay2-FakeTubes"
,
m_localPath
)
);
m_shaderTexturedFibers
=
osg
::
ref_ptr
<
WShader
>
(
new
WShader
(
"WMFiberDisplay2-Textured"
,
m_localPath
)
);
m_shaderTubes
=
osg
::
ref_ptr
<
W
GE
Shader
>
(
new
W
GE
Shader
(
"WMFiberDisplay2-FakeTubes"
,
m_localPath
)
);
m_shaderTexturedFibers
=
osg
::
ref_ptr
<
W
GE
Shader
>
(
new
W
GE
Shader
(
"WMFiberDisplay2-Textured"
,
m_localPath
)
);
// additional fire-condition: "data changed" flag
m_moduleState
.
setResetable
(
true
,
true
);
...
...
src/modules/fiberDisplay/WMFiberDisplay.h
View file @
1e018595
...
...
@@ -34,7 +34,7 @@
#include "../../graphicsEngine/WFiberDrawable.h"
#include "../../graphicsEngine/WROI.h"
#include "../../graphicsEngine/WROIBox.h"
#include "../../graphicsEngine/WShader.h"
#include "../../graphicsEngine/W
GE
Shader.h"
#include "../../kernel/WFiberSelector.h"
#include "../../kernel/WModule.h"
...
...
@@ -201,12 +201,12 @@ private:
/**
* the shader object for rendering tubes
*/
osg
::
ref_ptr
<
WShader
>
m_shaderTubes
;
osg
::
ref_ptr
<
W
GE
Shader
>
m_shaderTubes
;
/**
* the shader object for rendering textured lines
*/
osg
::
ref_ptr
<
WShader
>
m_shaderTexturedFibers
;
osg
::
ref_ptr
<
W
GE
Shader
>
m_shaderTexturedFibers
;
osg
::
ref_ptr
<
osg
::
Uniform
>
m_uniformTubeThickness
;
//!< tube thickness
...
...
src/modules/fiberDisplaySimple/WMFiberDisplaySimple.cpp
View file @
1e018595
...
...
@@ -30,7 +30,7 @@
#include "../../common/WPropertyObserver.h"
#include "../../dataHandler/WDataHandler.h"
#include "../../dataHandler/WDataTexture3D.h"
#include "../../graphicsEngine/WShader.h"
#include "../../graphicsEngine/W
GE
Shader.h"
#include "../../graphicsEngine/callbacks/WGENodeMaskCallback.h"
#include "../../graphicsEngine/callbacks/WGEFunctorCallback.h"
...
...
@@ -127,7 +127,7 @@ void enableTransparency( osg::StateSet* state )
void
WMFiberDisplaySimple
::
moduleMain
()
{
// initialize clipping shader
m_shader
=
osg
::
ref_ptr
<
WShader
>
(
new
WShader
(
"WMFiberDisplaySimple"
,
m_localPath
)
);
m_shader
=
osg
::
ref_ptr
<
W
GE
Shader
>
(
new
W
GE
Shader
(
"WMFiberDisplaySimple"
,
m_localPath
)
);
m_clipPlanePointUniform
=
new
WGEPropertyUniform
<
WPropPosition
>
(
"u_planePoint"
,
m_clipPlanePoint
);
m_clipPlaneVectorUniform
=
new
WGEPropertyUniform
<
WPropPosition
>
(
"u_planeVector"
,
m_clipPlaneVector
);
m_clipPlaneDistanceUniform
=
new
WGEPropertyUniform
<
WPropDouble
>
(
"u_distance"
,
m_clipPlaneDistance
);
...
...
src/modules/fiberDisplaySimple/WMFiberDisplaySimple.h
View file @
1e018595
...
...
@@ -29,7 +29,7 @@
#include "../../dataHandler/WDataSetScalar.h"
#include "../../graphicsEngine/WGEManagedGroupNode.h"
#include "../../graphicsEngine/WShader.h"
#include "../../graphicsEngine/W
GE
Shader.h"
#include "../../kernel/WModule.h"
#include "../../kernel/WModuleInputData.h"
#include "../../kernel/WModuleOutputData.h"
...
...
@@ -120,7 +120,7 @@ private:
/**
* The shader used for clipping of fibers using an arbitrary plane.
*/
osg
::
ref_ptr
<
WShader
>
m_shader
;
osg
::
ref_ptr
<
W
GE
Shader
>
m_shader
;
/**
* A property group for all the clipping related props.
...
...
src/modules/imageSpaceLIC/WMImageSpaceLIC.cpp
View file @
1e018595
...
...
@@ -43,7 +43,7 @@
#include "../../graphicsEngine/callbacks/WGENodeMaskCallback.h"
#include "../../graphicsEngine/callbacks/WGEShaderAnimationCallback.h"
#include "../../graphicsEngine/WGEGeodeUtils.h"
#include "../../graphicsEngine/WShader.h"
#include "../../graphicsEngine/W
GE
Shader.h"
#include "../../graphicsEngine/WGEOffscreenRenderPass.h"
#include "../../graphicsEngine/WGEOffscreenRenderNode.h"
#include "../../graphicsEngine/WGEPropertyUniform.h"
...
...
@@ -302,27 +302,27 @@ void WMImageSpaceLIC::moduleMain()
offscreen
->
getTextureHUD
()
->
addUpdateCallback
(
new
WGENodeMaskCallback
(
m_showHUD
)
);
// setup all the passes needed for image space advection
osg
::
ref_ptr
<
WShader
>
transformationShader
=
new
WShader
(
"WMImageSpaceLIC-Transformation"
,
m_localPath
);
osg
::
ref_ptr
<
W
GE
Shader
>
transformationShader
=
new
W
GE
Shader
(
"WMImageSpaceLIC-Transformation"
,
m_localPath
);
osg
::
ref_ptr
<
WGEOffscreenRenderPass
>
transformation
=
offscreen
->
addGeometryRenderPass
(
m_output
,
transformationShader
,
"Transformation"
);
osg
::
ref_ptr
<
WGEOffscreenRenderPass
>
edgeDetection
=
offscreen
->
addTextureProcessingPass
(
new
WShader
(
"WMImageSpaceLIC-Edge"
,
m_localPath
),
new
W
GE
Shader
(
"WMImageSpaceLIC-Edge"
,
m_localPath
),
"Edge Detection"
);
// we use two advection passes per frame as the input A of the first produces the output B whereas the second pass uses B as input and
// produces A as output. This way we can use A as input for the next step (clipping and blending).
osg
::
ref_ptr
<
WGEOffscreenRenderPass
>
advection
=
offscreen
->
addTextureProcessingPass
(
new
WShader
(
"WMImageSpaceLIC-Advection"
,
m_localPath
),
new
W
GE
Shader
(
"WMImageSpaceLIC-Advection"
,
m_localPath
),
"Advection"
);
// finally, put it back on screen, clip it, color it and apply depth buffer to on-screen buffer
osg
::
ref_ptr
<
WGEOffscreenRenderPass
>
clipBlend
=
offscreen
->
addFinalOnScreenPass
(
new
WShader
(
"WMImageSpaceLIC-ClipBlend"
,
m_localPath
),
new
W
GE
Shader
(
"WMImageSpaceLIC-ClipBlend"
,
m_localPath
),
"Clip & Blend"
);
...
...
src/modules/isosurfaceRaytracer/WMIsosurfaceRaytracer.cpp
View file @
1e018595
...
...
@@ -39,7 +39,7 @@
#include "../../graphicsEngine/WGEGeodeUtils.h"
#include "../../graphicsEngine/WGEManagedGroupNode.h"
#include "../../graphicsEngine/WGEUtils.h"
#include "../../graphicsEngine/WShader.h"
#include "../../graphicsEngine/W
GE
Shader.h"
#include "../../graphicsEngine/WGERequirement.h"
#include "../../kernel/WKernel.h"
#include "WMIsosurfaceRaytracer.xpm"
...
...
@@ -133,7 +133,7 @@ void WMIsosurfaceRaytracer::requirements()
void
WMIsosurfaceRaytracer
::
moduleMain
()
{
m_shader
=
osg
::
ref_ptr
<
WShader
>
(
new
WShader
(
"WMIsosurfaceRaytracer"
,
m_localPath
)
);
m_shader
=
osg
::
ref_ptr
<
W
GE
Shader
>
(
new
W
GE
Shader
(
"WMIsosurfaceRaytracer"
,
m_localPath
)
);
// let the main loop awake if the data changes or the properties changed.
m_moduleState
.
setResetable
(
true
,
true
);
...
...
src/modules/isosurfaceRaytracer/WMIsosurfaceRaytracer.h
View file @
1e018595
...
...
@@ -30,7 +30,7 @@
#include <osg/Node>
#include <osg/Uniform>
#include "../../graphicsEngine/WShader.h"
#include "../../graphicsEngine/W
GE
Shader.h"
#include "../../kernel/WModule.h"
#include "../../kernel/WModuleInputData.h"
#include "../../kernel/WModuleOutputData.h"
...
...
@@ -158,7 +158,7 @@ private:
/**
* the DVR shader.
*/
osg
::
ref_ptr
<
WShader
>
m_shader
;
osg
::
ref_ptr
<
W
GE
Shader
>
m_shader
;
/**
* Node callback to change the color of the shapes inside the root node. For more details on this class, refer to the documentation in
...
...