[GD-Design] mesh design issues
Brought to you by:
vexxed72
From: Dan T. <da...@cs...> - 2003-01-22 07:26:15
|
Hello all, A couple friends and I are designing a rendering engine and we ran into = a problem. The issue is this. When you are rendering meshes with = different effects on them, how do you generalize the rendering? When we = looked at it, it seemed like the best solution was a base class = DrawableMesh, with various subclasses that do different things, such as = a BumpMapMesh, a LightMappedMesh, etc. Each one of these subclasses = would know how to set up the rendering for themselves based upon how = many textures were allowed per pass on that card, and the various caps = of the card. These meshes would have their verteces, textures, and = shaders abstracted through a manager that handles reference counting for = those objects, and that sort of thing. The main issue we were having is the huge amount of subclasses required. = I mean, to us it seemed you would wind up with a class for every = permutation(combination?) of effect. e.g. you could conceivably(don't = know *why*, per se) wind up with a = LightMappedBumpMappedSpecularMappedSkinnedMesh, and that would have to = reimplement the aspect of light mapping, bump mapping, specular mappng, = and skinning. This seemed...wrong..to us. Does anyone have any better = ideas? This does seem a bit general for this list, so I'm ccing the GD-design = and GD-general lists..please reply there if you feel it more = appropriate. Apologies for a duplicate if any...i sent it from the wrong accoutn at = first and the list servers didn't like that. Any help greatly appreciated. Dan |