Abstracting Vertex/Input Layout

Started by
1 comment, last by Shael 12 years, 9 months ago
Does anyone have a good design up their sleeve on how to best abstract vertex/input layouts?

I'm trying to figure out something that would work for DX9/11 and perhaps OpenGL. I had thought that I'd try go down the route that DX11 has and couple the layout with the vertex shader, but I'm unsure if I can get the input layout from the shader in DX9 to be able to create the equivalent VertexDeclaration. I can get information about the constants via reflection in DX9 but I don't think it can give me info on the input layout?
Advertisement

Does anyone have a good design up their sleeve on how to best abstract vertex/input layouts?

I'm trying to figure out something that would work for DX9/11 and perhaps OpenGL. I had thought that I'd try go down the route that DX11 has and couple the layout with the vertex shader, but I'm unsure if I can get the input layout from the shader in DX9 to be able to create the equivalent VertexDeclaration. I can get information about the constants via reflection in DX9 but I don't think it can give me info on the input layout?


D3DXGetShaderInputSemantics should give you the info that you need for DX9.
Oh awesome. I looked everywhere but through all the D3DX* functions, lol. Thanks mate!

This topic is closed to new replies.

Advertisement