Demo: Green Dragon

Articles with the tag: Vertex Buffer

Scene Loading

[05/03/14 11:04]

Or I could just use DDS.

Because ResMan is for host memory only, it is up to the Mesh class to handle its own vertex buffer. Each ModelNode drawing the same Mesh object from ResMan must call Mesh's createVBO() function on init. Obviously this shouldn't be done every time, so the Mesh object will use a boolean is_vbo flag to prevent regeneration.

The memory will therefore persist in device memory until the scene is removed (i.e. all GraphNodes are destructed) upon which the ModelNode will scan the next scene file to be loaded to see if it should call the mesh->deleteVBO() function. This is to prevent reloading of elements in device memory between scenes.

Note: ResMan should check if resource exists before returning it, else it should throw an exception.

[05/03/14 14:12]

Testing render loop with temporary material ...

Read More »

Page 1 / 1