Skip to content

Instantly share code, notes, and snippets.

@Lavesson
Created March 21, 2013 00:25
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/5209741 to your computer and use it in GitHub Desktop.
Save Lavesson/5209741 to your computer and use it in GitHub Desktop.
Blog post demo. Case 2.
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 buffer; // Assuming that device doesn't remove this pointer
delete device;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment