XNA Creators Club Online
Page 1 of 1 (1 items)
Sort Posts: Previous Next

directory structures and resources

Last post 7/14/2009 7:55 AM by giugio. 0 replies.
  • 7/14/2009 7:55 AM

    directory structures and resources

    Hy.
    I'm still creating a little 3d engine with dx 10.
    I have for the resource and meshes a directory structure like this:

    -resource |
              |-shader1 |
              |         |- mesh1----->goblin.dae,goblin.jpg,goblin.dds ecc...  
              |         |- mesh2    
              |         |- mesh3
              |
              |-shader2 |
              |         |- mesh3  
              |         |- mesh4
             
    every mesh folder have inside the texture, normal map ecc...(every resources)and a .dae(collada)file model.
    the mesh folder is also under the shader folder thath contain the .fx shader that the mesh must rendered by.
    then mesh1,mesh2 and mesh3 is rendered by the shader1 and mesh3,mesh4 is rendered by the shader2.
    I have created a resource management singleton that traverse this directory structure and create all the meshes and the shaders.
    The problem is that each mesh can have a different render logic for example a mesh can change the color every 10 frame(and for do this set the color in the relatiove shader)and i can't list all the cases.
    I think to create a logic mesh class that do all the drawing logic work and incapsulate it in the mesh with the shader.
    The problem is: how the directory structure can expose this drawing logic properties and how save the classes?
    Can i use a script language?

    Thanks.

Page 1 of 1 (1 items) Previous Next
var gDomain='m.webtrends.com'; var gDcsId='dcschd84w10000w4lw9hcqmsz_8n3x'; var gTrackEvents=1; var gFpc='WT_FPC'; /*<\/scr"+"ipt>");} /*]]>*/
DCSIMG