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

Method createQuadVBO

testbed/src/SceneDemo.cpp:370–390  ·  view source on GitHub ↗

Used for debugging shadow maps

Source from the content-addressed store, hash-verified

368
369// Used for debugging shadow maps
370void SceneDemo::createQuadVBO() {
371
372 mVAOQuad.create();
373 mVAOQuad.bind();
374
375 static const GLfloat quadVertexData[] = {
376 -1.0f, -1.0f, 0.0f,
377 1.0f, -1.0f, 0.0f,
378 -1.0f, 1.0f, 0.0f,
379 -1.0f, 1.0f, 0.0f,
380 1.0f, -1.0f, 0.0f,
381 1.0f, 1.0f, 0.0f,
382 };
383
384 mVBOQuad.create();
385 mVBOQuad.bind();
386 mVBOQuad.copyDataIntoVBO(sizeof(quadVertexData), quadVertexData, GL_STATIC_DRAW);
387 mVBOQuad.unbind();
388
389 mVAOQuad.unbind();
390}
391
392// Create a the VAO and VBOs to render the debug infos
393void SceneDemo::createDebugVBO() {

Callers

nothing calls this directly

Calls 4

copyDataIntoVBOMethod · 0.80
createMethod · 0.45
bindMethod · 0.45
unbindMethod · 0.45

Tested by

no test coverage detected