尘羽泯
07-24-2011, 08:08 PM
Sorry,I am a programmer who is a Chinese. I cannot speak English very well.I hope you can understand me.
I have a bitmap that is the character "6".It's data is {0xFO,0xAA,0xBF,0xC0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0 x0,0x0,0x0,0x0,0x0}.
I use the function
gluBuild2DMipmaps(GL_TEXTURE_2D,GL_ALPHA,2,16,GL_A LPHA,GL_BITMAP,{0xFO,0xAA,0xBF,0xC0,0x0,0x0,0x0,0x 0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0})
can load the bitmap.
http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=download&Number=328&filename=6. jpg
But it looks so ugly.Dose the gluBuild2DMipmaps scale it?Why?The bitmap's weight is 2 and height is 16.Both can power of 2. Why the gluBuild2DMipmaps scale it?
I want use glTexImage2D instead of it.Because the bitmap's weight is 2 and height is 16.Both can power of 2.I think I can use glTexImage2D load it.
But I use the function
glTexImage2D(GL_TEXTURE_2D,0,GL_ALPHA,2,16,0,GL_AL PHA,GL_BITMAP,{0xFO,0xAA,0xBF,0xC0,0x0,0x0,0x0,0x0 ,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0})
load it then I draw a white rect not a character '6'.
http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=download&Number=329&filename=6. jpg
Why?can you help me ?
I have a bitmap that is the character "6".It's data is {0xFO,0xAA,0xBF,0xC0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0 x0,0x0,0x0,0x0,0x0}.
I use the function
gluBuild2DMipmaps(GL_TEXTURE_2D,GL_ALPHA,2,16,GL_A LPHA,GL_BITMAP,{0xFO,0xAA,0xBF,0xC0,0x0,0x0,0x0,0x 0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0})
can load the bitmap.
http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=download&Number=328&filename=6. jpg
But it looks so ugly.Dose the gluBuild2DMipmaps scale it?Why?The bitmap's weight is 2 and height is 16.Both can power of 2. Why the gluBuild2DMipmaps scale it?
I want use glTexImage2D instead of it.Because the bitmap's weight is 2 and height is 16.Both can power of 2.I think I can use glTexImage2D load it.
But I use the function
glTexImage2D(GL_TEXTURE_2D,0,GL_ALPHA,2,16,0,GL_AL PHA,GL_BITMAP,{0xFO,0xAA,0xBF,0xC0,0x0,0x0,0x0,0x0 ,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0})
load it then I draw a white rect not a character '6'.
http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=download&Number=329&filename=6. jpg
Why?can you help me ?