Jump to content
  • Advertisement


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


Rendering in DX8

This topic is 6454 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

Hi! I wish someone would tell me how do I implement function which renders objects with more than one texture. I have exported data from 3dsmax that gives me an opportunity to have more than one uv coordinate in one vertex. (I mean that every face could have its own texture.) I know how to do it if object has only one texture. How do I set the index buffer and vertex buffer to work with multiple textures in one object? Thanks. Edited by - zalian on March 15, 2001 7:27:28 AM

Share this post

Link to post
Share on other sites
Unfortunately, you are unable to change texture mid vertex stream. This means you have to group the polygons together that use the same texture. The DrawIndexedPrimitve() method can be used to draw only parts of a vertex buffer. So you could do this:

+ Set the vertex buffer

+ Set the index buffer

+ Set a first texture

+ Draw some of the vertex buffer

+ Set a second texture

+ Draw some more of the vertex buffer

+ etc

I remember asking the exact same question when I first started using D3D. It is a pain in the butt.


Share this post

Link to post
Share on other sites
You''re better off trying to seperate the rendering and the transformation part of your engine, for the simple reason that you''re probably end up drawing different textures/materials at different times (ie first the opaque, later the transparent) anyway.

For each object in my list I have a list of "face blocks" where each face block contains the material name, vertex data etc, and a pointer back to the actual object.. (clipping etc is done on a per object 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!