Commit 65808f7c authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum

[CHANGE] - all shaders now follow the new shader naming convention

parent 9977f6f7
......@@ -128,8 +128,8 @@ void WShader::SafeUpdaterCallback::operator()( osg::Node* node, osg::NodeVisitor
// reload the sources and set the shader
// vertex shader
WLogger::getLogger()->addLogMessage( "Reloading vertex shader \"" + m_shader->m_name + ".vs\"", "WShader", LL_DEBUG );
std::string source = m_shader->processShader( m_shader->m_name + ".vs" );
WLogger::getLogger()->addLogMessage( "Reloading vertex shader \"" + m_shader->m_name + "-vertex.glsl\"", "WShader", LL_DEBUG );
std::string source = m_shader->processShader( m_shader->m_name + "-vertex.glsl" );
if ( source != "" )
{
m_shader->m_vertexShader->setShaderSource( source );
......@@ -137,8 +137,8 @@ void WShader::SafeUpdaterCallback::operator()( osg::Node* node, osg::NodeVisitor
}
// fragment shader
WLogger::getLogger()->addLogMessage( "Reloading fragment shader \"" + m_shader->m_name + ".fs\"", "WShader", LL_DEBUG );
source = m_shader->processShader( m_shader->m_name + ".fs" );
WLogger::getLogger()->addLogMessage( "Reloading fragment shader \"" + m_shader->m_name + "-fragment.glsl\"", "WShader", LL_DEBUG );
source = m_shader->processShader( m_shader->m_name + "-fragment.glsl" );
if ( source != "" )
{
m_shader->m_fragmentShader->setShaderSource( source );
......@@ -146,8 +146,8 @@ void WShader::SafeUpdaterCallback::operator()( osg::Node* node, osg::NodeVisitor
}
// Geometry Shader
WLogger::getLogger()->addLogMessage( "Reloading geometry shader \"" + m_shader->m_name + ".gs\"", "WShader", LL_DEBUG );
source = m_shader->processShader( m_shader->m_name + ".gs", true );
WLogger::getLogger()->addLogMessage( "Reloading geometry shader \"" + m_shader->m_name + "-geometry.glsl\"", "WShader", LL_DEBUG );
source = m_shader->processShader( m_shader->m_name + "-geometry.glsl", true );
if ( source != "" )
{
m_shader->m_geometryShader->setShaderSource( source );
......
......@@ -48,8 +48,8 @@ WMFiberDisplay::WMFiberDisplay()
m_noData( new WCondition, true ),
m_osgNode( osg::ref_ptr< osg::Group >() )
{
m_shaderTubes = osg::ref_ptr< WShader > ( new WShader( "fake-tubes" ) );
m_shaderTexturedFibers = osg::ref_ptr< WShader > ( new WShader( "texturedFibers" ) );
m_shaderTubes = osg::ref_ptr< WShader > ( new WShader( "WMFiberDisplay-FakeTubes" ) );
m_shaderTexturedFibers = osg::ref_ptr< WShader > ( new WShader( "WMFiberDisplay-Textured" ) );
m_textureChanged = true;
}
......
......@@ -71,7 +71,7 @@ WMNavSlices::WMNavSlices():
// initialize members
std::string shaderPath = WKernel::getRunningKernel()->getGraphicsEngine()->getShaderPath();
m_shader = osg::ref_ptr< WShader > ( new WShader( "slice" ) );
m_shader = osg::ref_ptr< WShader > ( new WShader( "WMNavSlices" ) );
}
WMNavSlices::~WMNavSlices()
......
......@@ -125,7 +125,7 @@ void WMIsosurfaceRaytracer::properties()
void WMIsosurfaceRaytracer::moduleMain()
{
m_shader = osg::ref_ptr< WShader > ( new WShader( "IsosurfaceRaytracer" ) );
m_shader = osg::ref_ptr< WShader > ( new WShader( "WMIsosurfaceRaytracer" ) );
// let the main loop awake if the data changes or the properties changed.
m_moduleState.setResetable( true, true );
......
......@@ -30,7 +30,7 @@
// Varyings
/////////////////////////////////////////////////////////////////////////////
#include "IsosurfaceRaytracer.varyings"
#include "WMIsosurfaceRaytracer-varyings.glsl"
/////////////////////////////////////////////////////////////////////////////
// Uniforms
......
......@@ -30,7 +30,7 @@
// Varyings
/////////////////////////////////////////////////////////////////////////////
#include "IsosurfaceRaytracer.varyings"
#include "WMIsosurfaceRaytracer-varyings.glsl"
/////////////////////////////////////////////////////////////////////////////
// Uniforms
......
......@@ -155,7 +155,7 @@ void WMLIC::renderMesh( boost::shared_ptr< WTriangleMesh2 > mesh )
}
m_moduleNode->insert( m_surfaceGeode );
m_shader = osg::ref_ptr< WShader > ( new WShader( "licMeshRenderer" ) );
m_shader = osg::ref_ptr< WShader > ( new WShader( "WMLIC" ) );
m_shader->apply( m_surfaceGeode );
WKernel::getRunningKernel()->getGraphicsEngine()->getScene()->insert( m_moduleNode );
......
......@@ -443,7 +443,7 @@ void WMMarchingCubes::renderMesh()
// initially. Just set the texture changed flag to true. If this however might be needed use WSubject::getDataTextures.
m_textureChanged = true;
m_shader = osg::ref_ptr< WShader > ( new WShader( "surface" ) );
m_shader = osg::ref_ptr< WShader > ( new WShader( "WMMarchingCubes" ) );
m_shader->apply( m_surfaceGeode );
m_moduleNode->insert( m_surfaceGeode );
......
......@@ -128,7 +128,7 @@ void WMProbTractDisplay::properties()
void WMProbTractDisplay::moduleMain()
{
m_shader = osg::ref_ptr< WShader > ( new WShader( "PTDRaycast" ) );
m_shader = osg::ref_ptr< WShader > ( new WShader( "WMProbTractDisplay" ) );
// let the main loop awake if the data changes or the properties changed.
m_moduleState.setResetable( true, true );
......
......@@ -28,7 +28,7 @@
// Varyings
/////////////////////////////////////////////////////////////////////////////
#include "DVRRaycast.varyings"
#include "WMProbTractDisplay-varyings.glsl"
#include "WGELighting.glsl"
/////////////////////////////////////////////////////////////////////////////
......
......@@ -28,7 +28,7 @@
// Varyings
/////////////////////////////////////////////////////////////////////////////
#include "DVRRaycast.varyings"
#include "WMProbTractDisplay-varyings.glsl"
/////////////////////////////////////////////////////////////////////////////
// Uniforms
......
......@@ -45,7 +45,7 @@ W_LOADABLE_MODULE( WMSuperquadricGlyphs )
WMSuperquadricGlyphs::WMSuperquadricGlyphs():
WModule()
{
m_shader = osg::ref_ptr< WShader > ( new WShader( "gpuSuperQuadrics" ) );
m_shader = osg::ref_ptr< WShader > ( new WShader( "WMSuperquadricGlyphs" ) );
m_output = osg::ref_ptr< WGEGroupNode > ( new WGEGroupNode() );
}
......
......@@ -27,7 +27,7 @@
#include "WGEShadingTools.glsl"
// commonly used variables
#include "gpuSuperQuadrics.varyings"
#include "WMSuperquadricGlyphs-varyings.glsl"
// tollerance value for float comparisons
float zeroTollerance = 0.01;
......
......@@ -28,7 +28,7 @@
#include "WGETensorTools.glsl"
// commonly used variables
#include "gpuSuperQuadrics.varyings"
#include "WMSuperquadricGlyphs-varyings.glsl"
/////////////////////////////////////////////////////////////////////////////////////////////
// GPU Super Quadrics -- vertex shader -- main
......
......@@ -190,7 +190,7 @@ void WMTriangleMeshRenderer::renderMesh( boost::shared_ptr< WTriangleMesh2 > mes
}
m_moduleNode->insert( m_surfaceGeode );
m_shader = osg::ref_ptr< WShader > ( new WShader( "triangleMeshRenderer" ) );
m_shader = osg::ref_ptr< WShader > ( new WShader( "WMTriangleMeshRenderer" ) );
m_shader->apply( m_surfaceGeode );
WKernel::getRunningKernel()->getGraphicsEngine()->getScene()->insert( m_moduleNode );
......
......@@ -42,7 +42,7 @@ W_LOADABLE_MODULE( WMVectorPlot )
WMVectorPlot::WMVectorPlot():
WModule()
{
m_shader = osg::ref_ptr< WShader > ( new WShader( "vectorplot" ) );
m_shader = osg::ref_ptr< WShader > ( new WShader( "WMVectorPlot" ) );
}
WMVectorPlot::~WMVectorPlot()
......
......@@ -12,4 +12,9 @@ FILE( GLOB_RECURSE ALL_MODULE_SHADERS ${OW_SOURCE_DIR}/modules/*/shaders/* )
FOREACH( fname ${ALL_MODULE_SHADERS} )
#message( ${fname} )
configure_file( ${fname} ${CMAKE_BINARY_DIR}/bin/shaders/ COPYONLY)
ENDFOREACH( fname )
\ No newline at end of file
ENDFOREACH( fname )
FILE( GLOB_RECURSE ALL_KERNELMODULE_SHADERS ${OW_SOURCE_DIR}/kernel/modules/*/shaders/* )
FOREACH( fname ${ALL_KERNELMODULE_SHADERS} )
#message( ${fname} )
configure_file( ${fname} ${CMAKE_BINARY_DIR}/bin/shaders/ COPYONLY)
ENDFOREACH( fname )
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