Thread: Resetting the fixed function pipeline in D3D

  1. #1
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001

    Resetting the fixed function pipeline in D3D

    As of late I've been doing bump mapping and several other texture tricks and have realized one thing. Since D3D is a state machine, the state from one type of render is passed on to the next object.

    Without using state blocks, is there a way to just reset the texture stage states to their default values w/o having to specifically pass a parameter in a call to SetTextureStageState?

    For instance:

    These might be the default values but say they weren't. Is there a way to reset sampler 0 to it's default values?

  2. #2
    Bioport Productions
    Join Date
    Oct 2005
    Try this in the Shader:

    // Set up texture stage 0
            Texture[0] = <texture1>; // Use the texture parameter defined above
            ColorOp[0] = Modulate;
            ColorArg1[0] = Texture;
            ColorArg2[0] = Diffuse;
            AlphaOp[0] = Modulate;
            AlphaArg1[0] = Texture;
            AlphaArg2[0] = Diffuse;
            MinFilter[0] = Linear;
            MagFilter[0] = Linear;
            MipFilter[0] = Linear;
    -"What we wish, we readily believe, and what we ourselves think, we imagine others think also."
    PHP Code:

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Bisection Method function value at root incorrect
    By mr_glass in forum C Programming
    Replies: 3
    Last Post: 11-10-2005, 09:10 AM
  2. Change this program so it uses function??
    By stormfront in forum C Programming
    Replies: 8
    Last Post: 11-01-2005, 08:55 AM
  3. const at the end of a sub routine?
    By Kleid-0 in forum C++ Programming
    Replies: 14
    Last Post: 10-23-2005, 06:44 PM
  4. Question..
    By pode in forum Windows Programming
    Replies: 12
    Last Post: 12-19-2004, 07:05 PM
  5. Linking error
    By DockyD in forum C++ Programming
    Replies: 10
    Last Post: 01-20-2003, 05:27 AM