19 #ifndef SURGSIM_GRAPHICS_OSGUNIFORMTYPES_H 20 #define SURGSIM_GRAPHICS_OSGUNIFORMTYPES_H 27 #include <osg/Uniform> 38 class OsgTextureCubeMap;
39 class OsgTextureRectangle;
49 return osg::Uniform::UNDEFINED;
53 inline osg::Uniform::Type getOsgUniformType<float>()
55 return osg::Uniform::FLOAT;
58 inline osg::Uniform::Type getOsgUniformType<double>()
60 return osg::Uniform::DOUBLE;
63 inline osg::Uniform::Type getOsgUniformType<int>()
65 return osg::Uniform::INT;
68 inline osg::Uniform::Type getOsgUniformType<unsigned int>()
70 return osg::Uniform::UNSIGNED_INT;
73 inline osg::Uniform::Type getOsgUniformType<bool>()
75 return osg::Uniform::BOOL;
79 inline osg::Uniform::Type getOsgUniformType<SurgSim::Math::Vector2f>()
81 return osg::Uniform::FLOAT_VEC2;
84 inline osg::Uniform::Type getOsgUniformType<SurgSim::Math::Vector3f>()
86 return osg::Uniform::FLOAT_VEC3;
89 inline osg::Uniform::Type getOsgUniformType<SurgSim::Math::Vector4f>()
91 return osg::Uniform::FLOAT_VEC4;
95 inline osg::Uniform::Type getOsgUniformType<SurgSim::Math::Vector2d>()
97 return osg::Uniform::DOUBLE_VEC2;
100 inline osg::Uniform::Type getOsgUniformType<SurgSim::Math::Vector3d>()
102 return osg::Uniform::DOUBLE_VEC3;
105 inline osg::Uniform::Type getOsgUniformType<SurgSim::Math::Vector4d>()
107 return osg::Uniform::DOUBLE_VEC4;
111 inline osg::Uniform::Type getOsgUniformType<SurgSim::Math::Matrix22f>()
113 return osg::Uniform::FLOAT_MAT2;
116 inline osg::Uniform::Type getOsgUniformType<SurgSim::Math::Matrix33f>()
118 return osg::Uniform::FLOAT_MAT3;
121 inline osg::Uniform::Type getOsgUniformType<SurgSim::Math::Matrix44f>()
123 return osg::Uniform::FLOAT_MAT4;
127 inline osg::Uniform::Type getOsgUniformType<SurgSim::Math::Matrix22d>()
129 return osg::Uniform::DOUBLE_MAT2;
132 inline osg::Uniform::Type getOsgUniformType<SurgSim::Math::Matrix33d>()
134 return osg::Uniform::DOUBLE_MAT3;
137 inline osg::Uniform::Type getOsgUniformType<SurgSim::Math::Matrix44d>()
139 return osg::Uniform::DOUBLE_MAT4;
143 inline osg::Uniform::Type getOsgUniformType<std::shared_ptr<OsgTexture1d>>()
145 return osg::Uniform::SAMPLER_1D;
149 inline osg::Uniform::Type getOsgUniformType<std::shared_ptr<OsgTexture2d>>()
151 return osg::Uniform::SAMPLER_2D;
155 inline osg::Uniform::Type getOsgUniformType<std::shared_ptr<OsgTexture3d>>()
157 return osg::Uniform::SAMPLER_3D;
161 inline osg::Uniform::Type getOsgUniformType<std::shared_ptr<OsgTextureCubeMap>>()
163 return osg::Uniform::SAMPLER_CUBE;
167 inline osg::Uniform::Type getOsgUniformType<std::shared_ptr<OsgTextureRectangle>>()
169 return osg::Uniform::SAMPLER_2D_RECT;
176 #endif // SURGSIM_GRAPHICS_OSGUNIFORMTYPES_H Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui n...
Definition: AddRandomSphereBehavior.cpp:36
Definitions of small fixed-size square matrix types.
Definitions of small fixed-size vector types.