2-dimensional drawing

Started by
2 comments, last by HappySnapper 22 years, 10 months ago
does anybody have a method of drawing bitmaps of any dimensions onto the screen for OpenGL? I understand that drawing the bitmap as a texture would work nicely but I don''t know how to overcome the "power of 2" limitations on textures. Thanx!!!
Advertisement
See glDrawPixels. I personally would recommend just using textured quads in orthographic mode. Also, many video cards don''t have the power of two limitation anymore. You could also use the Mip-Mapping thing to get around it.

[Resist Windows XP''s Invasive Production Activation Technology!]
Hrmmm... getting annoyed now.. 3rd post about the ''limitations'' of the texture sizes.

All you have to do, is paste your 200x60 (or whatever) sized picture into a 256x256 sized one. Then in your ''game'' you can specify the texture co-ords that relate to the position of that 200x60 texture in the bigger 256x256 one. Is it really so hard?

Hopefully you know what a texture co-ordinate is and does.
quote:Original post by wAVaRiaN

All you have to do, is paste your 200x60 (or whatever) sized picture into a 256x256 sized one. Then in your 'game' you can specify the texture co-ords that relate to the position of that 200x60 texture in the bigger 256x256 one. Is it really so hard?

The dimensions don't have to be the same. He could put it in a 256x64 texture if he wanted to. I'd personally just stretch/shrink it to the nearest size that has a power of two number of pixels per side. As long as you don't stretch too much, the distortion is pretty small.

[Resist Windows XP's Invasive Production Activation Technology!]

Edited by - Null and Void on June 23, 2001 8:49:40 PM

This topic is closed to new replies.

Advertisement