GL: Occlusion query bugfix

This commit is contained in:
kaetemi 2014-08-03 22:15:12 +02:00
parent 59b1141d37
commit f4d83149a7

View file

@ -2803,9 +2803,13 @@ IOcclusionQuery::TOcclusionType COcclusionQueryGL::getOcclusionType()
else
{
GLuint result;
nglGetQueryObjectuivARB(ID, GL_QUERY_RESULT, &result);
OcclusionType = result != 0 ? NotOccluded : Occluded;
VisibleCount = (uint) result;
nglGetQueryObjectuivARB(ID, GL_QUERY_RESULT_AVAILABLE, &result);
if (result != GL_FALSE)
{
nglGetQueryObjectuivARB(ID, GL_QUERY_RESULT, &result);
OcclusionType = result != 0 ? NotOccluded : Occluded;
VisibleCount = (uint) result;
}
}
}
#endif