Pixmap operations?

Monkey Forums/Monkey Programming/Pixmap operations?

zoqfotpik(Posted 2013) [#1]
In Monkey, is there any recommended way to operate on a low-res pixmap, then scale the pixmap to the device size? I want to do a number of pixel level graphics effects like cycling and semi-true CLUT/copper effects in addition to hand-rolled masking and some of the things I want to do are just unrealistic at larger res. Any ideas?


GW_(Posted 2013) [#2]
Create an empty image and a 1D int array the same size as your image
Every frame, do all your drawing ops to the array and then call myimage.Writepixels( myarray, 0,0,w,h)
then scale the screen matrix and draw your image at 0,0.


zoqfotpik(Posted 2013) [#3]
That's great. Thank you.


zoqfotpik(Posted 2013) [#4]
Question: is there a way to have Mojo draw operations draw to int arrays or should I roll my own copyrect?


Gerry Quinn(Posted 2013) [#5]
Maybe the GLFW native code is hackable to allow this, it seems to draw on a software array of the same structure. I don't know how many platforms this is applicable to though. But you could at least clone the native C++ code in Monkey.