Added check to make sure that glEnablei and glDisablei are only called when the capability is non zero to fix GL invalid value error.
This commit is contained in:
parent
8127ddc541
commit
ed683678c0
@ -42,7 +42,7 @@ void Enablei::apply(State& state) const
|
|||||||
if (extensions->glEnablei)
|
if (extensions->glEnablei)
|
||||||
{
|
{
|
||||||
OSG_INFO<<"extensions->glEnablei("<<_capability<<", "<<_index<<")"<<std::endl;
|
OSG_INFO<<"extensions->glEnablei("<<_capability<<", "<<_index<<")"<<std::endl;
|
||||||
extensions->glEnablei(_capability, static_cast<GLuint>(_index));
|
if (_capability) extensions->glEnablei(_capability, static_cast<GLuint>(_index));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -56,7 +56,7 @@ void Disablei::apply(State& state) const
|
|||||||
if (extensions->glDisablei)
|
if (extensions->glDisablei)
|
||||||
{
|
{
|
||||||
OSG_INFO<<"extensions->glDisablei("<<_capability<<", "<<_index<<")"<<std::endl;
|
OSG_INFO<<"extensions->glDisablei("<<_capability<<", "<<_index<<")"<<std::endl;
|
||||||
extensions->glDisablei(_capability, static_cast<GLuint>(_index));
|
if (_capability) extensions->glDisablei(_capability, static_cast<GLuint>(_index));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user