Debian Codegraph @

src/MyCanvas.h

raw symbols ◀ ▶ SCIP
1 Debian patch touch this file
1
2
3 class MyCanvas{
4 public:
5
6
7 bool ratio2x1;
8
9 typedef enum{ COLOR, DEPTH, COLOR_AND_DEPTH } Kind;
10 Kind kind;
11
12 bool SetAsOutput();
•13 void SetAsTexture();
14
15 bool Test(){return SetAsOutput();}
16
17 MyCanvas(Kind k, int size);
18 MyCanvas(Kind k);
19
20 void SetRes( int res );
21 void SetResPow2( int pow );
22
23 int GetSoftRes();
24 int GetHardRes();
25
26 int GetResPow2( ) {return currentRes; }
27 int GetVideoSize( ) {return videoSize; }
28 void SetSameRes( const MyCanvas &c );
29
30 void RedirectToVideo();
31 void RedirectToMemory();
32 void SetVideoSize(int v); // when redirectig to video
33
34 private:
35 int currentRes; // just an index
36 enum {MAX_RES=15};
37 unsigned int frameID[MAX_RES];
38 unsigned int textureID[MAX_RES];
39 bool InitRes();
40 bool onVideo;
41 int videoSize;
42 int softRes; // subset image, not a power of 2
43 };
44
45 extern MyCanvas mainCanvas, haloCanvas, moltextureCanvas, shadowmapCanvas, shadowAOCanvas;
46
47