Archived

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

D3DFVF_CUSTOMVERTEX

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

can you make as many custom verteces as you want. I thought maybe you could make one for a cube then another one for some ground, -one for each type of 3d object you want to make. Basicly I thought of making some custom vertices first and then putting them on the screen later (in the program) where I wanted them. The other thing I've been thinking about is the d3d device, this is the thing that renders your whole scene, I have been in some confusion over this. Is this right, you can have lots of objects but only 1 d3d device? also can you have more than 1 stream? edit, I've got to try and get this question right, if you have a game you could have lots of things on the screen at the same time, scenary, all your objects, your player & so on, they are all done through one d3d device, but would you have a separate custom vertex for each type of object? would you have a separate buffer for each type of object. [edited by - Stevieboy on October 11, 2003 5:28:35 AM]

Share this post


Link to post
Share on other sites
quote:

The other thing I''ve been thinking about is the d3d device, this is the thing that renders your whole scene, I have been in some confusion over this. Is this right, you can have lots of objects but only 1 d3d device?



Direct3D currently supports two main types of Direct3D devices: a hardware abstraction layer (HAL) device with hardware-accelerated rasterization and shading with both hardware and software vertex processing; and a reference device. That said; you can only use one device at a time.

quote:

can you make as many custom verteces as you want. I thought maybe you could make one for a cube then another one for some ground, -one for each type of 3d object you want to make. Basicly I thought of making some custom vertices first and then putting them on the screen later (in the program) where I wanted them.
...
but would you have a separate custom vertex for each type of object? would you have a separate buffer for each type of object.



There is no limit to the number of custom flexible vertex formats (FVF) that you can create. Although, there is an upper mathematical limit to the number of unique custom FVF that can be created. I would recommend that you start by creating a new custom FVF and vertex buffer for each object. This implementation is simple and will get you moving. That said, to answer your question, you only need one vertex buffer (VB) per unique FVF.



Understanding is a three edged sword...

Share this post


Link to post
Share on other sites
Thanks for your reply Sean, I did eventually figure out about using one d3d device, yes, I think I will do one FVF-VB for each type. The next thing I was thinking of is how to make a separate .h file to hold them and how to call them when needed.

Share this post


Link to post
Share on other sites