|
@ -10,7 +10,7 @@ |
|
|
#include <ratio> |
|
|
#include <ratio> |
|
|
|
|
|
|
|
|
#include "stfu/stf.hpp" |
|
|
#include "stfu/stf.hpp" |
|
|
#include "pngwriter/pngwriter.h" |
|
|
//#include "pngwriter/pngwriter.h"
|
|
|
#include "bmp.h" |
|
|
#include "bmp.h" |
|
|
|
|
|
|
|
|
#include "shader.h" |
|
|
#include "shader.h" |
|
@ -237,11 +237,13 @@ public: |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void scene() { |
|
|
void scene() { |
|
|
if(mouse_buttons[0] || mouse_buttons[1] || mouse_buttons[2]){ |
|
|
if(true || mouse_buttons[0] || mouse_buttons[1] || mouse_buttons[2]){ |
|
|
mshader.set_uniform("steps", counter/10); |
|
|
mshader.set_uniform("steps", counter/10); |
|
|
mshader.set_uniform("button", (mouse_buttons[0] ? 0 : (mouse_buttons[1] ? 1 : 2))); |
|
|
mshader.set_uniform("button", (mouse_buttons[0] ? 0 : (mouse_buttons[1] ? 1 : 2))); |
|
|
|
|
|
|
|
|
glEnableClientState(GL_VERTEX_ARRAY); |
|
|
glEnableClientState(GL_VERTEX_ARRAY); |
|
|
|
|
|
mouse[0] = 0.5; |
|
|
|
|
|
mouse[1] = 0.5; |
|
|
glVertexPointer(2, GL_FLOAT, 0, &mouse[0]); |
|
|
glVertexPointer(2, GL_FLOAT, 0, &mouse[0]); |
|
|
glPointSize(50.0/1.0); |
|
|
glPointSize(50.0/1.0); |
|
|
glDrawArrays(GL_POINTS, 0, 1); |
|
|
glDrawArrays(GL_POINTS, 0, 1); |
|
@ -260,6 +262,7 @@ public: |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void save_screen(){ |
|
|
void save_screen(){ |
|
|
|
|
|
#if 0 |
|
|
unsigned char data[width*height*6]; |
|
|
unsigned char data[width*height*6]; |
|
|
glReadPixels(0, 0, width, height, GL_RGB, GL_UNSIGNED_SHORT, data); |
|
|
glReadPixels(0, 0, width, height, GL_RGB, GL_UNSIGNED_SHORT, data); |
|
|
|
|
|
|
|
@ -268,6 +271,7 @@ public: |
|
|
|
|
|
|
|
|
pngwriter png(width, height, &data[0], filename); |
|
|
pngwriter png(width, height, &data[0], filename); |
|
|
png.close(); |
|
|
png.close(); |
|
|
|
|
|
#endif |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void save_bmp(){ |
|
|
void save_bmp(){ |
|
|