12 #ifndef SHADERUNIFORM_H_6014714286
13 #define SHADERUNIFORM_H_6014714286
15 #include <Carna/Carna.h>
40 template<
typename ValueType >
107 virtual void uploadTo(
int location )
const = 0;
111 const static int NULL_UNIFORM_LOCATION = -1;
127 void CARNA_LIB uploadUniform(
int location,
const int value );
129 void CARNA_LIB uploadUniform(
int location,
const unsigned int value );
131 void CARNA_LIB uploadUniform(
int location,
const float value );
133 void CARNA_LIB uploadUniform(
int location,
const math::Vector2f& value );
135 void CARNA_LIB uploadUniform(
int location,
const math::Vector3f& value );
137 void CARNA_LIB uploadUniform(
int location,
const math::Vector4f& value );
139 void CARNA_LIB uploadUniform(
int location,
const math::Matrix3f& value );
141 void CARNA_LIB uploadUniform(
int location,
const math::Matrix4f& value );
165 template<
typename ValueType >
171 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
188 virtual void uploadTo(
int location )
const override;
193 template<
typename ValueType >
201 template<
typename ValueType >
205 uploadUniform( location, static_cast< const UniformType& >( value ) );
214 #endif // SHADERUNIFORM_H_6014714286
Defines Carna::base::math namespace and CARNA_FOR_VECTOR3UI.
Eigen::Matrix< float, 2, 1 > Vector2f
Defines vector.
Eigen::Matrix< float, 4, 1 > Vector4f
Defines vector.
Eigen::Matrix< float, 3, 1 > Vector3f
Defines vector.
Maintains an OpenGL shader program. Realizes the RAII-idiom.
Represents a color. Objects from this class are copyable and assignable.
Eigen::Matrix< float, 4, 4, Eigen::ColMajor > Matrix4f
Defines matrix.
Eigen::Matrix< float, 3, 3, Eigen::ColMajor > Matrix3f
Defines matrix.