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

Textured Quad

Last post 3/29/2007 12:51 PM by L0STlogic. 3 replies.
  • 3/27/2007 9:12 PM

    Textured Quad

    I have a Quad class I created and it works...mostly.  I want it to be textured, but it seems to use the texture of the last object rendered, my sky sphere.  I tried posting the code, but that didn't come out right.

     Basically what I'm doing is, create an array of VertexPositionNormalTexture with 6 elements.  I set all the points, UV coordinates, and normals.  This is used to represent the ground so the normal points up.  In Draw() I use DrawUserPrimitives.  Before drawing I set the Texture property on the BasicEffect to the texture I want to use.  It seems to use the sky sphere texture.  What am I doing wrong?  I have had a hard time finding anything that uses the BasicEffect with a textured quad.

    -Wil Burton
  • 3/28/2007 6:51 PM In reply to

    Re: Textured Quad

    Are you calling effect.End(); between drawing the sky and the terrain?
    --
    Gamer Outfit - XNA News and Reviews
    Maker of Exisled - Helicopter 2d/3d Shooter available now!
  • 3/29/2007 8:03 AM In reply to

    Re: Textured Quad

    My SkySphere is a model so I'm not calling Effect.Start() or Effect.End().  I just added those lines in there with no change.
    -Wil Burton
  • 3/29/2007 12:51 PM In reply to

    Re: Textured Quad

    Please post or link your code segment here so I can look at it and try to fix your problem.
    --
    Gamer Outfit - XNA News and Reviews
    Maker of Exisled - Helicopter 2d/3d Shooter available now!
Page 1 of 1 (4 items) Previous Next