Browse Source

(committing very old stuff) Probably trying to make it compile

master
Joshua Moerman 8 years ago
parent
commit
d4a44880ad
  1. 8
      App.h
  2. 2
      fbo.h

8
App.h

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

2
fbo.h

@ -5,6 +5,8 @@
#include <GL/glew.h>
#include <GL/freeglut.h>
//#import <OpenGLES/ES2/gl.h>
//#import <OpenGLES/ES2/glext.h>
class fbo {
public: