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

[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 );
......
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