Sign in to follow this  
bballmitch

Scaling a bitmap

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this