MCPcopy Create free account
hub / github.com/davideberly/GeometricTools / EndOcclusionQuery

Method EndOcclusionQuery

GTE/Graphics/GL46/GL46Engine.cpp:265–283  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

263}
264
265uint64_t GL46Engine::EndOcclusionQuery(GLuint occlusionQuery)
266{
267 if (occlusionQuery > 0)
268 {
269 glEndQuery(GL_SAMPLES_PASSED);
270
271 GLint resultAvailable = GL_FALSE;
272 while (!resultAvailable)
273 {
274 glGetQueryObjectiv(occlusionQuery, GL_QUERY_RESULT_AVAILABLE, &resultAvailable);
275 }
276 GLint samplesPassed = 0;
277 glGetQueryObjectiv(occlusionQuery, GL_QUERY_RESULT, &samplesPassed);
278 glDeleteQueries(1, &occlusionQuery);
279 return static_cast<uint64_t>(samplesPassed);
280 }
281
282 LogError("No query provided.");
283}
284
285bool GL46Engine::EnableShaders(std::shared_ptr<VisualEffect> const& effect, GLuint program)
286{

Callers

nothing calls this directly

Calls 3

glEndQueryFunction · 0.85
glGetQueryObjectivFunction · 0.85
glDeleteQueriesFunction · 0.85

Tested by

no test coverage detected