mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-22 23:26:15 +00:00
GL: Occlusion query bugfix
This commit is contained in:
parent
5f5f0dd76c
commit
2ad030f5f9
1 changed files with 7 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue