Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

pcman

Index Vertex Buffer.

This topic is 5278 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m a newbie in D3D 9. I want to create a cube by Index Vertex Buffer. But there''s no Demos and Examples in D3D 9''s doc, Who can write a little demo for me ? Thanks.

Share this post


Link to post
Share on other sites
Advertisement
There are plenty of tutorials online.

I''ll just blindly assume you meant Managed DirectX (since you weren''t too specific) and link you here

Share this post


Link to post
Share on other sites
hey,
Making a cube using an index buffer is a bad idea because each vertex on the cube will share the same data which will result in:

1. Lighting will be impossible b/c the normals will be shared

2. Texture mapping the cube will not be possible because the texture coords will be the shared for each vertex

Indexbuffers are good in certain situation such as terrain and models. They just don''t work for cubes.

Share this post


Link to post
Share on other sites
for learning purpose, you can do it with 4 vertices per face which then will let you do lighting and texture on a per face basis.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!