Skip to main content
GameDev.net gamedev.net
๐Ÿ”’ Locked

Scaling a bitmap

Started by bballmitch Apr 22, 2006 at 3:50 PM 2 replies 550+ views
Original Post
bballmitch
bballmitch

glPushMatrix();
          glColor3f(1.0,1.0,1.0);
          glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
          glRasterPos3f(0,0,-1);
          glDrawPixels(bitmapInfoHeader.biWidth, bitmapInfoHeader.biHeight, GL_RGB, GL_UNSIGNED_BYTE, bitmapData);
          glPopMatrix();

That draws a bitmap, and it works. However, the bitmap shows up too big. So I tried putting in a glScalef() in there, but that had NO effect. I tried changing the raster position so the bitmap seemed farther away. I tried not using glRasterPos() and using glTranslatef() instead. None of those worked. The bitmap just stayed the same size. How do I change the size of this bitmap?
Mitchen Games
Tac-Tics
Tac-Tics
Try using the bitmap as a texture instead of drawing it directly to the screen.
bballmitch
bballmitch
how would I do that?
Mitchen Games
Tac-Tics
Tac-Tics
Quote:
Original post by bballmitch
how would I do that?


By using Google, of course:

http://www.gamedev.net/reference/articles/article947.asp
http://www.google.com/search?hl=en&q=opengl+texture&btnG=Google+Search

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.