mirror of https://github.com/axmolengine/axmol.git
Merge branch 'improved_glprogram' of github.com:super626/cocos2d-x into improved_glprogram
This commit is contained in:
commit
a2361b30de
|
@ -102,36 +102,42 @@ void UniformValue::setValue(float value)
|
||||||
{
|
{
|
||||||
CCASSERT (_uniform->type == GL_FLOAT, "");
|
CCASSERT (_uniform->type == GL_FLOAT, "");
|
||||||
_value.floatValue = value;
|
_value.floatValue = value;
|
||||||
|
_useCallback = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UniformValue::setValue(int value)
|
void UniformValue::setValue(int value)
|
||||||
{
|
{
|
||||||
CCASSERT ((_uniform->type == GL_INT || _uniform->type == GL_SAMPLER_2D), "");
|
CCASSERT ((_uniform->type == GL_INT || _uniform->type == GL_SAMPLER_2D), "");
|
||||||
_value.intValue = value;
|
_value.intValue = value;
|
||||||
|
_useCallback = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UniformValue::setValue(const Vector2& value)
|
void UniformValue::setValue(const Vector2& value)
|
||||||
{
|
{
|
||||||
CCASSERT (_uniform->type == GL_FLOAT_VEC2, "");
|
CCASSERT (_uniform->type == GL_FLOAT_VEC2, "");
|
||||||
_value.v2Value = value;
|
_value.v2Value = value;
|
||||||
|
_useCallback = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UniformValue::setValue(const Vector3& value)
|
void UniformValue::setValue(const Vector3& value)
|
||||||
{
|
{
|
||||||
CCASSERT (_uniform->type == GL_FLOAT_VEC3, "");
|
CCASSERT (_uniform->type == GL_FLOAT_VEC3, "");
|
||||||
_value.v3Value = value;
|
_value.v3Value = value;
|
||||||
|
_useCallback = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UniformValue::setValue(const Vector4& value)
|
void UniformValue::setValue(const Vector4& value)
|
||||||
{
|
{
|
||||||
CCASSERT (_uniform->type == GL_FLOAT_VEC4, "");
|
CCASSERT (_uniform->type == GL_FLOAT_VEC4, "");
|
||||||
_value.v4Value = value;
|
_value.v4Value = value;
|
||||||
|
_useCallback = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UniformValue::setValue(const Matrix& value)
|
void UniformValue::setValue(const Matrix& value)
|
||||||
{
|
{
|
||||||
CCASSERT(_uniform->type == GL_FLOAT_MAT4, "");
|
CCASSERT(_uniform->type == GL_FLOAT_MAT4, "");
|
||||||
_value.matrixValue = value;
|
_value.matrixValue = value;
|
||||||
|
_useCallback = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue