opensurgsim
Namespaces | Functions
OsgUniformGlslTypes.h File Reference

Functions to get the OSG uniform type enum for a given type. More...

#include <memory>
#include "SurgSim/Math/Matrix.h"
#include "SurgSim/Math/Vector.h"

Go to the source code of this file.

Namespaces

 SurgSim
 Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui needs glew but we need to call glewInit() from a osg callback, using this call we avoid getting warnings about redefinitions.
 

Functions

template<class T >
const std::string SurgSim::Graphics::getGlslType ()
 Returns the OSG uniform type enum value for the template parameter type. More...
 
template<>
const std::string SurgSim::Graphics::getGlslType< float > ()
 
template<>
const std::string SurgSim::Graphics::getGlslType< double > ()
 
template<>
const std::string SurgSim::Graphics::getGlslType< int > ()
 
template<>
const std::string SurgSim::Graphics::getGlslType< unsigned int > ()
 
template<>
const std::string SurgSim::Graphics::getGlslType< bool > ()
 
template<>
const std::string SurgSim::Graphics::getGlslType< SurgSim::Math::Vector2f > ()
 
template<>
const std::string SurgSim::Graphics::getGlslType< SurgSim::Math::Vector3f > ()
 
template<>
const std::string SurgSim::Graphics::getGlslType< SurgSim::Math::Vector4f > ()
 
template<>
const std::string SurgSim::Graphics::getGlslType< SurgSim::Math::Vector2d > ()
 
template<>
const std::string SurgSim::Graphics::getGlslType< SurgSim::Math::Vector3d > ()
 
template<>
const std::string SurgSim::Graphics::getGlslType< SurgSim::Math::Vector4d > ()
 
template<>
const std::string SurgSim::Graphics::getGlslType< SurgSim::Math::Matrix22f > ()
 
template<>
const std::string SurgSim::Graphics::getGlslType< SurgSim::Math::Matrix33f > ()
 
template<>
const std::string SurgSim::Graphics::getGlslType< SurgSim::Math::Matrix44f > ()
 
template<>
const std::string SurgSim::Graphics::getGlslType< SurgSim::Math::Matrix22d > ()
 
template<>
const std::string SurgSim::Graphics::getGlslType< SurgSim::Math::Matrix33d > ()
 
template<>
const std::string SurgSim::Graphics::getGlslType< SurgSim::Math::Matrix44d > ()
 
template<>
const std::string SurgSim::Graphics::getGlslType< std::shared_ptr< OsgTexture1d > > ()
 
template<>
const std::string SurgSim::Graphics::getGlslType< std::shared_ptr< OsgTexture2d > > ()
 
template<>
const std::string SurgSim::Graphics::getGlslType< std::shared_ptr< OsgTexture3d > > ()
 
template<>
const std::string SurgSim::Graphics::getGlslType< std::shared_ptr< OsgTextureCubeMap > > ()
 
template<>
const std::string SurgSim::Graphics::getGlslType< std::shared_ptr< OsgTextureRectangle > > ()
 

Detailed Description

Functions to get the OSG uniform type enum for a given type.

Function Documentation

§ getGlslType()

template<class T >
const std::string SurgSim::Graphics::getGlslType ( )
inline

Returns the OSG uniform type enum value for the template parameter type.

This template function is specialized to match each type with an enum value. Any types for which the function is not specialized will return osg::Uniform::UNDEFINED.

Template Parameters
TData type
Returns
OSG uniform type enum value

§ getGlslType< std::shared_ptr< OsgTexture1d > >()

template<>
const std::string SurgSim::Graphics::getGlslType< std::shared_ptr< OsgTexture1d > > ( )
inline
Note
This name depends on the fact of OSS using integer types for the texture types if we introduce a different type as the data type for the texture, the name has to be changed accordingly

§ getGlslType< std::shared_ptr< OsgTexture2d > >()

template<>
const std::string SurgSim::Graphics::getGlslType< std::shared_ptr< OsgTexture2d > > ( )
inline
Note
This name depends on the fact of OSS using integer types for the texture types if we introduce a different type as the data type for the texture, the name has to be changed accordingly

§ getGlslType< std::shared_ptr< OsgTexture3d > >()

template<>
const std::string SurgSim::Graphics::getGlslType< std::shared_ptr< OsgTexture3d > > ( )
inline
Note
This name depends on the fact of OSS using integer types for the texture types if we introduce a different type as the data type for the texture, the name has to be changed accordingly

§ getGlslType< std::shared_ptr< OsgTextureCubeMap > >()

template<>
const std::string SurgSim::Graphics::getGlslType< std::shared_ptr< OsgTextureCubeMap > > ( )
inline
Note
This name depends on the fact of OSS using integer types for the texture types if we introduce a different type as the data type for the texture, the name has to be changed accordingly