Are Vertex Buffers Really that faster?

Started by
2 comments, last by Esap1 24 years, 1 month ago
Are they, I really dont want to use them, I want to use an array of my own Vertex Class that has a D3DVERTEX in it so I can draw them using DrawPrimitive. Is this OK?
Advertisement
Vertex buffer is only faster if your primitives share vertices. If they don''t then they can even be a little slower, but hardly noticeable.
A neat trick that you can do in a situation like that is to derive your class from D3DVERTEX, like so:

class MyVertex : public D3DVERTEX
{
// your own methods here
};

Then you can pass in a MyVertex object to any function that expects a D3DVERTEX object and it will work properly. Also, MyVertex inherits all of D3DVERTEX''s functions and data members -- you don''t have to declare them again. I don''t know much about the D3DVERTEX structure specifically, or how it would affect performance though.

Good Luck!


- null_pointer
DAT KICKS BUTT, cool , thanks a lot!
later,

This topic is closed to new replies.

Advertisement