image size "power of 2"?

BlitzMax Forums/BlitzMax Programming/image size "power of 2"?

MrCredo(Posted 2005) [#1]
if i load a sprite in Blitz3D - it resize my loaded texture image to a default size: 16,32,64,128,256 etc - all power of 2...

i checked pixmap.width/height in BlitzMax - it return 'perfect' image size... but - how many memory take a 80x80 image?

use it 80x80 pixels or full 128x128 pixels internaly?


ImaginaryHuman(Posted 2005) [#2]
an `Image` would be 128x128 ... not sure about the pixmap


FlameDuck(Posted 2005) [#3]
how many memory take a 80x80 image?
Currently none. All textures must be perfect powers of 2. It's not a memory issue as much as a graphics card/OpenGL one.


dmoc(Posted 2005) [#4]
Newer gl extensions allow non-power-of-2 images. Also when estimating gfx memory requirements remember about mipmaps.


jhague(Posted 2005) [#5]
'twould be very nice for the 2D module to automatically use the non-power-of-2 image extension, if available.


MrCredo(Posted 2005) [#6]
hm but...

i have here a rectangular 168x256 image... i don't like stretching this to 256x256 and in my program back to 168x256...

width/height of this pixmap is also 168x256px.
when i draw a point to coord. 167,255 - it look's very clean at my screen... not "filtered" or something...

i think blitzmax set a "vertex-range" to max 167,255 - but it use internaly full 256x256 pixels...


blitz3d works different - here was not possible to use smaler textures. blitz3d resize this automaticaly... i think blitzmax do a better job :-)