Sign in to follow this  
Axiverse

Discrepencies in Vertex Buffer Creation

Recommended Posts

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...

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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

Sign in to follow this