Commit eaa1a149 authored by Michele Bosi's avatar Michele Bosi

Added vector uniform getters.

parent 8f2b7605
......@@ -211,6 +211,22 @@ namespace vl
int getUniformI() const { VL_CHECK( type() != UT_NONE ); VL_CHECK( mData.size() == 1 ); int val; getUniform(&val); return val; }
unsigned int getUniformU() const { VL_CHECK( type() != UT_NONE ); VL_CHECK( mData.size() == 1 ); unsigned int val; getUniform(&val); return val; }
ivec2 getUniform2I() const { ivec2 v; getUniform( v.ptr() ); return v; }
ivec3 getUniform3I() const { ivec3 v; getUniform( v.ptr() ); return v; }
ivec4 getUniform4I() const { ivec4 v; getUniform( v.ptr() ); return v; }
uvec2 getUniform2U() const { uvec2 v; getUniform( v.ptr() ); return v; }
uvec3 getUniform3U() const { uvec3 v; getUniform( v.ptr() ); return v; }
uvec4 getUniform4U() const { uvec4 v; getUniform( v.ptr() ); return v; }
fvec2 getUniform2F() const { fvec2 v; getUniform( v.ptr() ); return v; }
fvec3 getUniform3F() const { fvec3 v; getUniform( v.ptr() ); return v; }
fvec4 getUniform4F() const { fvec4 v; getUniform( v.ptr() ); return v; }
dvec2 getUniform2D() const { dvec2 v; getUniform( v.ptr() ); return v; }
dvec3 getUniform3D() const { dvec3 v; getUniform( v.ptr() ); return v; }
dvec4 getUniform4D() const { dvec4 v; getUniform( v.ptr() ); return v; }
void getUniform(double* value) const { VL_CHECK(type() != UT_NONE); VL_CHECK(mData.size()); memcpy( value, &mData[0], sizeof(mData[0]) * mData.size()); }
void getUniform(float* value) const { VL_CHECK(type() != UT_NONE); VL_CHECK(mData.size()); memcpy( value, &mData[0], sizeof(mData[0]) * mData.size()); }
void getUniform(int* value) const { VL_CHECK(type() != UT_NONE); VL_CHECK(mData.size()); memcpy( value, &mData[0], sizeof(mData[0]) * mData.size()); }
......
......@@ -37,7 +37,6 @@
#include <vlGraphics/Rendering.hpp>
#include <vlGraphics/CalibratedCamera.hpp>
#include <vlGraphics/SceneManagerActorTree.hpp>
// #include <vlVolume/SlicedVolume.hpp>
#include <vlVivid/VividVolume.hpp>
namespace vl
......
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