summaryrefslogtreecommitdiff
path: root/liveengine/src/viewport.h
blob: 4c3f948fa3c93ea4ed159fb387f57222c32a6238 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#ifndef VIEWPORT_H
#define VIEWPORT_H

#include "ofxOpenNI.h"
#include "ofMain.h"
#include "playlist.h"

#define NUM_NOTES 64
#define START_NOTE 36
#define NUM_CONTROLLERS 6
#define START_CONTROLLER 102

#define NOTHING 0
#define BLOCKS 1
#define LIST 2

void bindTexture(ofBaseHasTexture &t);
void unbindTexture(ofBaseHasTexture &t);
void bindTex(ofTexture &tex);
void unbindTex(ofTexture &tex);

class viewport
{
    public:
	viewport();
	viewport(int _w,int _h,int _x,int _y,float _r,int _ox,int _oy);
        void setup(int _w,int _h,int _x,int _y,float _r,int _ox,int _oy);
	void draw(float a,unsigned char* controllers,int xshift,int yshift,playlist &list,bool transparentBlack,int note,int mode,ofColor* controller_colours,bool controlColours,float scale,float fscale,float colShift);
        void mapdraw(float a,unsigned char* controllers,int xshift,int yshift,playlist &list,bool transparentBlack,int note,int mode,ofColor* controller_colours,bool controlColours,float scale,float fscale,float colShift);
		
	ofImage testtexture;
    virtual ~viewport();
	void setUG(ofxUserGenerator *_rUser);
	ofFbo rb1,rb2,rb3;
	float r;
    bool isMapped;
    protected:
	    int x, y,w,h,ox,oy;
		
		ofxUserGenerator *rUser;
    private:
	
	
};

class mappedviewport: public viewport {
	public:
		mappedviewport(int _w,int _h,int _x,int _y,float _r,int _ox,int _oy);
		void setUG(ofxUserGenerator *_rUser);
		void mapdraw(float a,unsigned char* controllers,int xshift,int yshift,playlist &list,bool transparentBlack,int note,int mode,ofColor* controller_colours,bool controlColours,float scale,float fscale,float colShift);
		ofxUserGenerator *rUser;
};

#endif // VIEWPORT_H