Guys Can I Ask You Something?
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.
Quote:Original post by ace_lovegroveIt'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.
vertex buffer class?
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
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement