linux-wallpaperengine/src/WallpaperEngine/Render/Shaders/Variables/CShaderVariableVector3.cpp
Alexis Maiquez d7cf8af7ca + created global variable storage for shaders
+ added g_Time to global variable storage
- removed global g_Time from main
~ changed "shader parameters" to "shader variables" as it's a more apt naming

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2019-09-10 13:27:18 +02:00

31 lines
883 B
C++

#include "CShaderVariableVector3.h"
using namespace WallpaperEngine::Render::Shaders::Variables;
CShaderVariableVector3::CShaderVariableVector3 (const irr::core::vector3df& defaultValue) :
m_defaultValue (defaultValue),
m_value (irr::core::vector3df ()),
CShaderVariable (&this->m_defaultValue, nullptr, Type)
{
}
CShaderVariableVector3::CShaderVariableVector3 (const irr::core::vector3df& defaultValue, std::string name) :
m_defaultValue (defaultValue),
m_value (irr::core::vector3df ()),
CShaderVariable (&this->m_defaultValue, nullptr, Type)
{
this->setName (name);
}
void CShaderVariableVector3::setValue (const irr::core::vector3df& value)
{
this->m_value = value;
CShaderVariable::setValue (&this->m_value);
}
const int CShaderVariableVector3::getSize () const
{
return 3;
}
const std::string CShaderVariableVector3::Type = "vec3";