(committing very old stuff) Probably trying to make it compile
This commit is contained in:
parent
6da20f666a
commit
d4a44880ad
2 changed files with 10 additions and 4 deletions
8
App.h
8
App.h
|
@ -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(){
|
||||||
|
|
2
fbo.h
2
fbo.h
|
@ -5,6 +5,8 @@
|
||||||
|
|
||||||
#include <GL/glew.h>
|
#include <GL/glew.h>
|
||||||
#include <GL/freeglut.h>
|
#include <GL/freeglut.h>
|
||||||
|
//#import <OpenGLES/ES2/gl.h>
|
||||||
|
//#import <OpenGLES/ES2/glext.h>
|
||||||
|
|
||||||
class fbo {
|
class fbo {
|
||||||
public:
|
public:
|
||||||
|
|
Reference in a new issue