Archived

This topic is now archived and is closed to further replies.

HappySnapper

2-dimensional drawing

Recommended Posts

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!!!

Share this post


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

Share this post


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

Share this post


Link to post
Share on other sites