Scaled pixmaps

BlitzMax Forums/BlitzMax Programming/Scaled pixmaps

tonyg(Posted 2007) [#1]
This was requested.
Not sure how useable speedwise it is but any comments welcome.



ImaginaryHuman(Posted 2007) [#2]
Try calling glPixelZoom(XZoom:Float,YZoom:Float), e.g.
glPixelZoom(2.0,2.0)

before calling DrawPixmap() - it will zoom it on the fly.


tonyg(Posted 2007) [#3]
I tried that and it seems just as quick (slow) on my machine as the method above. As it is OGL only it would need compiler directives so I went for simplicity and using native commands.


ImaginaryHuman(Posted 2007) [#4]
The reason it's probably the same speed is due to the bottleneck of the graphics bus when you send the same amount of data across it. DrawPixels() is totally CPU and bus speed dependent. Maybe then the only speedup you could do is write your own faster pixmap scaling algorithm, and while you're at it, might as well make it rotate as well. See my pixmap rotation code in another thread.