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

Method create

testbed/opengl-framework/src/VertexBufferObject.cpp:43–61  ·  view source on GitHub ↗

Create the vertex buffer object

Source from the content-addressed store, hash-verified

41
42// Create the vertex buffer object
43bool VertexBufferObject::create() {
44
45 // Destroy the current VBO
46 destroy();
47
48 // Check that the needed OpenGL extensions are available
49 bool isExtensionOK = checkOpenGLExtensions();
50 if (!isExtensionOK) {
51 std::cerr << "Error : Impossible to use Vertex Buffer Object on this platform" << std::endl;
52 assert(false);
53 return false;
54 }
55
56 // Generate a new VBO
57 glGenBuffers(1, &mVertexBufferID);
58 assert(mVertexBufferID != 0);
59
60 return true;
61}
62
63// Copy data into the VBO
64void VertexBufferObject::copyDataIntoVBO(GLsizei size, const void* data, GLenum usage) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected