Skip to content

Instantly share code, notes, and snippets.

@Lavesson
Last active December 15, 2015 05:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Lavesson/5209705 to your computer and use it in GitHub Desktop.
Save Lavesson/5209705 to your computer and use it in GitHub Desktop.
Blog post demo. Case 1.
int main()
{
// Create the device, buffer and a mesh
auto device = new Device();
auto buffer = device->CreateVertexBuffer();
auto mesh = new Mesh(buffer);
// ... Doing a bunch of stuff
// Cleanup
delete mesh;
delete device; // Assuming that the device class deletes the buffer
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment