Skip to main content
gamedev.net
🔒 Locked

Vertex format class setup

Started by MARS_999 2 replies 1.1k views
Original Post
MARS_999
MARS_999
I am trying to make a single class that will probably have to be a template class.... I am guessing on that.

I would like to have a class that allows any format based on some variable that are set at time of creation.

I may have a vertex with texCoords, normals or texCoords, normals, tangents ect....

I am out of ideas on how to accomplish this now, I have as of now many different classes one for each scenario and would like to combine them into one if that is possible?

Thanks!
szecs
szecs
Um..., I don't quite understand the question. Your application needs a vertex format that's best for your application. That doesn't really have to do anything with loading. You fill your own structure anyway you like it. You have to make different loaders/parsers for different file types. Not one configurable/whatever structure that you have to fill with different loaders anyway. Use the best format, or even multiple formats (one for editing the vertex data and one for displaying it for example)
Hodgman
Hodgman
If you mean a class that describes a vertex format, I use something similar to an array of D3D's d3dvertexelement9 structures.
MARS_999
MARS_999

If you mean a class that describes a vertex format, I use something similar to an array of D3D's d3dvertexelement9 structures.


Thanks Hodgman! That is what I needed.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.