-
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..
-
Re: two things...
nevermind about 2
just please help with the first thing.
-
Junior Member
Regular Contributor
Re: two things...
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
-
Re: two things...
where would i put this glPixelZoom(1.0,-1.0); ?
[This message has been edited by method5 (edited 03-28-2002).]
-
Junior Member
Regular Contributor
Re: two things...
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).]
-
Re: two things...
ive tried it a few places.. and it doenst seem to be working.. do you have aim (kdghsu) or icq (21159213)? thank you
-
Re: two things...
is there something you have to do it enable it first before you can use those?
-
Junior Member
Regular Contributor
Re: two things...
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).]
-
Re: two things...
it just dosent want to work for me.. anyone willing to take a look at my code.. if so please post your email
-
Junior Member
Regular Contributor
Re: two things...
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).]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules