Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

THUD Update

Sign in to follow this  


Ok so ive been working hard on a template wrapped vertex buffer.

This item has come along very nicely and appears quite robust now and should be available to download in a short while.

The features of this item are as follows:

Name : auto_vb
Description: Is a wrapper for a DirectX Vertex Buffer and through careful management of memory acts as a scalable vertex buffer. Simply when u add more vertices to an already full buffer, or one that doesn't have quite enough room, it will make a new one of appropriate size for you. It also make sure your data remains intact. You are able to add vertices to auto_vb in many ways. You can stream vertices in using << and out to a vector using >>. You can concatenate two auto_vb object together using the binary operator +. The operator overloads are done in similar fashion to the std:streams which means you can link streaming together for input to the buffer. You can add by passing arrays to a Write() function, passing an std::vector or by a single vertex. You can also specify it to create it of a specific size, rather than the size of what is passed to it in other modes of instantation.

It keeps track of the size and capacity of the buffer which is very useful since u need this value when it comes to using DrawPrimitive() etc.

A SetProps() method needs to be called and needs to have a properties struct passed to it post creation only if u create using the default constructor otherwise this struct must be passed in with the data to be stored.

Well the code quality is pretty good and im looking for people to test it and give me feedback. So if you would like a copy of the source to either read through or to test in your own projects then please reply here with ur email address and ill mail it off. Although if you wait it will be available from my site.

This item will be bundled with the THUD API i am writing, so it will be available for download with that.

The auto_vb.h file has a text at the top saying more or less what i have said here and also contains details for contacting me. It also has a brief code snippet to give u and idea of how to use it.

Well if you have taken time to read this, then thanks and i will look forward to any feedback i get.

Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!