Sunday, May 15, 2005

MBGraphics Library

Alrighty! My MBGraphics library is in development now. I have very big plans with this portion of the MBLib. Currently I have created a simple renderer and vertex buffer interface.

Currently the renderer clears the display to the desired clear color, activates a vertex buffer, and renders basic primitives (points, lines, and triangles).

The vertex buffer interface creates a static buffer of vertices. The interface is setup to be extended into a dynamic vertex buffer to allow the client manipulate the vertices. At present, you can add vertices to the vertex buffer just as long as the buffer hasn't reached its maximum capacity. The idea I have behind encapsulating the Direct3D vertex buffer interface is to aid in batch loading of vertices. I want it to be able to load all vertices that use the same Flexible Vertex Format (FVF). This will help performance when rendering mesh objects because we can sort the objects and render them all at once without having to reset the stream source for each object.

I am also desiging a VertexBufferPool interface to manage a number of vertex buffers. I want this to extend over to the mesh loading interface as well. The idea is that each mesh that shares the same FVF will manage an ID to the vertex buffer provided by the VertexBufferPool.

Also, the main graphics querying interface is being designed. That will allow a client to query the number of video cards attached to the system and theirhardware capabilities. It's priority will be to manage both the main Direct3D interface and Direct3D device.

Once those interfaces have been completed, I will post a sample application using the components of the MBLib (MBApp, MBWin, and MBGraphics). That's all for now, so stay tuned for more updates.

OOH OOH EEH EEH

2 comments:

mudface said...

Rockin' Glad to see a post. =) Can't wait for those demo apps! Go Monkeyboy!

monkeyboy said...

Thanks man! I have a couple, but they aren't too big at the moment. Putting together a terrain class that showcases the Vertex and Index buffer interfaces.

Stay tuned...