Guys Can I Ask You Something?

Started by
24 comments, last by dave 18 years, 12 months ago
I usually just copy and paste code out of my other projects. I try to keep everything as modular as possible, so I can just drop in my window base code, vertex buffer classes, D3D device setup code, etc.
Advertisement
vertex buffer classe?

I wrote a managed vertex buffer class, is that what urs is?

ace
Quote:Original post by ace_lovegrove
vertex buffer class?
It's just a class that wraps the creation, (un)locking and lost device info. It's most useful for dynamic VBs, because it returns the next chunk of data in the VB, so you don't need to keep track of what's been used in your VB.
I did have a version of the class that did some buffer checking in debug mode (much like how the CRT checks allocations when you free them), but I seem to have misplaced it.
I wrote mine so that you dont have to worry about resizing the VB and IB, it will resize it for you maintaining the data, and it also fits into DP calls easily as well.

You up for swapping code?

ace
VertexBuffer.h
VertexBuffer.cpp

I don't actually have a class for index buffers, but it wouldn't be a lot of work to convert the VB code to use IBs. I'll try to find the old vertex buffer code I had (which did a bit of debug managment) later on.
IB
VB

ace

This topic is closed to new replies.

Advertisement