MCPcopy Create free account
hub / github.com/DanielChappuis/reactphysics3d / renderSinglePass

Method renderSinglePass

testbed/src/SceneDemo.cpp:313–333  ·  view source on GitHub ↗

Render the scene in a single pass

Source from the content-addressed store, hash-verified

311
312// Render the scene in a single pass
313void SceneDemo::renderSinglePass(openglframework::Shader& shader, const openglframework::Matrix4& worldToCameraMatrix) {
314
315 if (mIsWireframeEnabled) {
316 glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
317 }
318
319 // Bind the shader
320 shader.bind();
321
322 // Render all the physics objects of the scene
323 for (std::vector<PhysicsObject*>::iterator it = mPhysicsObjects.begin(); it != mPhysicsObjects.end(); ++it) {
324 (*it)->render(mIsWireframeEnabled ? mColorShader : shader, worldToCameraMatrix);
325 }
326
327 // Unbind the shader
328 shader.unbind();
329
330 if (mIsWireframeEnabled) {
331 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
332 }
333}
334
335// Create the Shadow map FBO and texture
336void SceneDemo::createShadowMapFBOAndTexture() {

Callers

nothing calls this directly

Calls 5

bindMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
renderMethod · 0.45
unbindMethod · 0.45

Tested by

no test coverage detected