| 263 | } |
| 264 | |
| 265 | uint64_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 | |
| 285 | bool GL46Engine::EnableShaders(std::shared_ptr<VisualEffect> const& effect, GLuint program) |
| 286 | { |
nothing calls this directly
no test coverage detected