Discrepencies in Vertex Buffer Creation

Started by
0 comments, last by Xrystal 17 years, 10 months ago
I've encountered a problem where if i create a vertex buffer one way, there is no problem, but if i create it another way, nothing shows up on screen. It works if created like this:
new VertexBuffer(typeof(Sprite.Vertex), 4, device, Usage.Dynamic, 0, Pool.Default);
But not like this:
new VertexBuffer(device, Sprite.Vertex.Stride * 4, Usage.Dynamic, 0, Pool.Default);
I've tried to find the difference between the two, but the descriptions are exactly the same... They both have the same size, same parameters, everything, and yet one works and not the other...
Advertisement
Yep, I noticed the same problem in VS 2003 Managed C++. And looking at my old Jump Start play code seems I did the same code in C# 2005 too but not sure if it was due to a problem or not.

This topic is closed to new replies.

Advertisement