An idea i had regarding flexible vertex formats in an engine.

Started by
0 comments, last by DaJudge 19 years, 8 months ago
Not claiming this as my creation but ive decided just to have 1 vertex format through the entire engine. I'm going to make have all teh necessary properties for non-transformed and pre-transformed vertices. This way when i start moving certices around i dont have to worry about compatibility. does anyone else do this? ace
Advertisement
Hm. Currently I am doing this as well since my engine is still in very early development. But that will definitely change once I get to animation and things like that.
The way I plan to go is to store the vertex declaration together with the mesh in the file. That way I don't have to worry about file formats as far as that is concerned. Plus your exporter / converter can use the minimalistic vertex layout for the mesh which will save you some bandwidth (and might be better more friendly for the vertex cache of the GPU).
Properly set up this won't impose any problems since you can freely remap the elements of your vertices to vertex shader input registers.

Hope that helps,
Alex
Alexander Stockinger
Programmer

This topic is closed to new replies.

Advertisement