void SkyDomeShader::use(SubObject* so)throw(SimulatorException) { GUARD(glUseProgram(mGLProgramHandle)); setupTransformationUniforms(so); VisualMaterial * visMat = dynamic_cast<VisualMaterial*>(so->getMaterial()); assert(visMat); setupMaterialUniforms(visMat); //---------- uncategorized uniforms to come ------------------------------------------------ bindVector3D("eyePositionW",URE_INSTANCE->getCurrentlyActiveCamera()->getGlobalTransform().getPosition()); }
//virtual bool operator==(const Shader& rhs)const; void GenericLightingUberShader::use(SubObject *so) throw (SimulatorException) { GUARD(glUseProgram(mGLProgramHandle)); //--------------------------------------------------------- setupTransformationUniforms(so); //---------------------------------------------------------- if( (mLocalShaderFeatures.shadingFeatures & SHADING_FEATURE_DIRECT_LIGHTING) !=0) { setupLightSourceUniforms(); } //---------------------------------------------------------- VisualMaterial * visMat = dynamic_cast<VisualMaterial*>(so->getMaterial()); assert(visMat); setupMaterialUniforms(visMat); //---------- uncategorized uniforms to come ------------------------------------------------ bindVector3D("eyePositionW",URE_INSTANCE->getCurrentlyActiveCamera()->getGlobalTransform().getPosition()); }