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

Method create

testbed/opengl-framework/src/VertexArrayObject.cpp:42–60  ·  view source on GitHub ↗

Create the vertex buffer object

Source from the content-addressed store, hash-verified

40
41// Create the vertex buffer object
42bool VertexArrayObject::create() {
43
44 // Destroy the current VAO
45 destroy();
46
47 // Check that the needed OpenGL extensions are available
48 bool isExtensionOK = checkOpenGLExtensions();
49 if (!isExtensionOK) {
50 std::cerr << "Error : Impossible to use Vertex Array Object on this platform" << std::endl;
51 assert(false);
52 return false;
53 }
54
55 // Generate a new VAO
56 glGenVertexArrays(1, &mVertexArrayID);
57 assert(mVertexArrayID != 0);
58
59 return true;
60}
61
62// Destroy the VAO
63void VertexArrayObject::destroy() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected