two things...

first… my when adding my textures to my tiles… they are upside down and backwards??? i brought a screenshot into photoshop and had to turn 180 degrees and flip horizontaly to get it to look right…

to display my tiles i am using…

		glBindTexture(GL_TEXTURE_2D, tiles[tile]);
		glBegin(GL_QUADS);
		 glTexCoord2f(0.0f,0.0f);
		 glVertex2f(drawingx, drawingy);
		 glTexCoord2f(1.0f,0.0f);
		 glVertex2f(drawingx + 32, drawingy);
		 glTexCoord2f(1.0f,1.0f);
		 glVertex2f(drawingx + 32, drawingy + 32);
		 glTexCoord2f(0.0f,1.0f);
		 glVertex2f(drawingx,drawingy + 32);
		glEnd();

any ideas?

also… the textures I am loading… (bitmaps) are being antialised… meaning blured a little. how do I stop that? i want sharp pixels…

nevermind about 2 just please help with the first thing.

Hi. Bitmaps by default are stored “upside down.” You can do what you did and save it upside down in Photoshop, or flip it using glPixelZoom()

Old GLman

where would i put this glPixelZoom(1.0,-1.0); ?

[This message has been edited by method5 (edited 03-28-2002).]

Hi. After you have loaded the .bmp and before you make the call to glTexImage2d(), or glDrawPixels() etc… So:
glPixelZoom(-1.0f, 1.0f); // flip it horizontally baby!
glPixelZoom( 1.0f,-1.0f); // flip it right side up baby!

lol
Old GLman

[This message has been edited by Old GLman (edited 03-28-2002).]

ive tried it a few places… and it doenst seem to be working… do you have aim (kdghsu) or icq (21159213)? thank you

is there something you have to do it enable it first before you can use those?

Hi. I know for a fact that glPixelZoom() can be used to flip .bmps, I have done it myself. It is probably working, but not positioned right. In other words it may just not be in view. Set the raster position with glRasterPos2f().
Let me know if you have any more problems.
Old GLman

[This message has been edited by Old GLman (edited 03-28-2002).]

it just dosent want to work for me… anyone willing to take a look at my code… if so please post your email

Ok, ill aim you in one sec. We’ll figure this out.

EDIT: Hey I cant help you if your not on aim or icq… hehe

Old GLman

[This message has been edited by Old GLman (edited 03-28-2002).]

hrmm… whats your screenname?

Originally posted by method5:

[quote]

glBindTexture(GL_TEXTURE_2D, tiles[tile]);
glBegin(GL_QUADS);
 glTexCoord2f(0.0f,0.0f);
 glVertex2f(drawingx, drawingy);
 glTexCoord2f(1.0f,0.0f);
 glVertex2f(drawingx + 32, drawingy);
 glTexCoord2f(1.0f,1.0f);
 glVertex2f(drawingx + 32, drawingy + 32);
 glTexCoord2f(0.0f,1.0f);
 glVertex2f(drawingx,drawingy + 32);
glEnd();

Try this:

glBindTexture(GL_TEXTURE_2D, tiles[tile]);
glBegin(GL_QUADS);
 glTexCoord2f(1.0f,1.0f);
 glVertex2f(drawingx, drawingy);
 glTexCoord2f(0.0f,1.0f);
 glVertex2f(drawingx + 32, drawingy);
 glTexCoord2f(0.0f,0.0f);
 glVertex2f(drawingx + 32, drawingy + 32);
 glTexCoord2f(1.0f,0.0f);
 glVertex2f(drawingx,drawingy + 32);
glEnd();

As for the ‘blurry’ stuff, that’s texture filtering. Add this to the loading code of the tile textures (do it for each tile!)

glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST);

thanks! the blurring thing worked…but the other thing didnt// but i figured it out…

glBindTexture(GL_TEXTURE_2D, tiles[tile]);
glBegin(GL_QUADS);
glTexCoord2f(0.0f,1.0f); glVertex2f(drawingx, drawingy);
glTexCoord2f(0.0f,0.0f); glVertex2f(drawingx,drawingy+32);
glTexCoord2f(1.0f,0.0f); glVertex2f(drawingx + 32, drawingy + 32);
glTexCoord2f(1.0f,1.0f); glVertex2f(drawingx+32, drawingy);
glEnd();