Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import snow.api.buffers.Uint8Array;
- import snow.modules.opengl.GL;
- //....
- override function onkeyup( e:KeyEvent ) {
- if(e.keycode == Key.key_h) {
- var w:Int = Std.int(Luxe.screen.w);
- var h:Int = Std.int(Luxe.screen.h);
- if(pix == null) pix = new Uint8Array(w * h * 3);
- GL.readPixels(0, 0, w, h, GL.RGB, GL.UNSIGNED_BYTE, pix);
- trace('${pix[0]} ${pix[1]} ${pix[2]}');
- Luxe.snow.io.data_save('/Users/sven/dev/test.raw', pix);
- }
- } //onkeyup
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement