   Sprite Drawing Troubles
  I am having a problem with drawing sprites in my game. The code I wrote is extremely simple and should work fine with any sprite I give it but sometimes it creates weird artifacts. Here is a sample of one of them:http://home.cc.umanitoba.ca/~umkorema/media/error.gifand here is the code I use to draw it:glBegin(GL_QUADS);glVertex2s(nX    , nY-nHeight); glTexCoord2s( 0, 0 );glVertex2s(nX    , nY   ); glTexCoord2s( 1, 0 );glVertex2s(nX+nWidth, nY); glTexCoord2s( 1, 1 );glVertex2s(nX+nWidth, nY-nHeight); glTexCoord2s( 0, 1 );glEnd();An interesting note is that there are only ever artifacts when I first draw a quad. Every quad after that is fine.-Greg    Reverie Entertainment
  Here is a better screenshot showing the problem:http://home.cc.umanitoba.ca/~umkorema/media/error2.gifThe code used to draw the above image is in the previous post. Here are the values that are in the function.x: 272 y: 428 width: 256 height: 256Any help here would be great.-Greg    Reverie Entertainment;  Here is one more pic. For no apparent reason it switches from this to error2 (previous post). The parameters passed to the function are exactly the same in both cases. I know this because I sampled the values straight from the function so there is no interference anywhere.http://home.cc.umanitoba.ca/~umkorema/media/error3.gif-Greg    Reverie Entertainment [edited by - Greg K on August 1, 2003 5:23:32 AM];  You are passing texture coordinates in the wrong order. first pass texture coordinates and colors, THEN pass the actual vertex (glVertexblahblah). So your first vertex gets bogus texture coordinates and the other ones gets texcoords from the vertex before. 