shaders & the fixed/programmable pipeline
- From: "Richy" <movieknight@xxxxxxxxx>
- Date: 24 Aug 2006 21:12:16 -0700
Hi,
I currently use the fixed-function pipeline and have been reasonably
happy with it so far, but I want to get into more advanced lighting
with shaders. Is it straightforward enough mixing the programmable
pipeline with the fixed? I'll explain what I'd like to do.
I have a class for every object that represents an object in the 3D
world, and other classes that those objects might rely upon. For
instance, a class for a face, cube, triangle, staircase etc and also
classes for textures, materials (which can be linked to textures) and
so on.
The texture class has rendering properties associated with it, so when
I do a rendering pass for all objects with a particular texture, the
correct rendering properties are set based upon the texture class. I'm
thinking that all I need to do is create a Shader class, which will
have a name and some code attached to it, and I can link the Shader
class to the Texture class (in the same way that I link a Material
class to the Texture).
When I come to render the texture, if the texture has a shader
associated with it then I can use the shader (and the programmable
pipeline), and if it doesn't, then I can continue to use the
fixed-function pipeline as I have been doing all along.
Is it possible to mix and match the two pipelines without doing a major
rewrite?
Thanks,
Richy
.
- Follow-Ups:
- Re: shaders & the fixed/programmable pipeline
- From: Richard [Microsoft Direct3D MVP]
- Re: shaders & the fixed/programmable pipeline
- Prev by Date: Re: problem in texturing with direct3d mobile
- Next by Date: Re: problem in texturing with direct3d mobile
- Previous by thread: Re: Drawing a rectangle
- Next by thread: Re: shaders & the fixed/programmable pipeline
- Index(es):
Relevant Pages
|