Jump to content
Posted 05 September 2012 - 01:51 AM
Posted 05 September 2012 - 02:25 AM
Create a GRAPHIC class that again will initiate with DEVICE and SHADER objects and render all the geometry.
Edited by Ashaman73, 05 September 2012 - 04:53 AM.
Posted 05 September 2012 - 03:38 AM
Posted 05 September 2012 - 04:59 AM
You have not much of a framework yet. Here are more details about my approach, at least it works for me:
I was thinking about state changes and other CPU operations that will make the shader class reliable instead of just loading some shader files like textures. Also the framework strucutre is ok even if I dont complicate the things with shader ? I mean for everything else, like initiating objects with other objects and so on.
Model -> vertices,tris etc. -> Model Textur data -> Material Material -> State (zbuffer, blending etc) -> Shader -> Material Texture Data -> Mapping The Mapping links parameter, textures etc. to shader parameters: Model_Texture_0 -> Shader:tex_unit_0 Material_Texture_Shadomap -> Shader:tex_unit_1