summaryrefslogtreecommitdiff
path: root/cad/plugins/QuteMol/qutemol/src/Common.h
blob: f1615f20cd0094db9ea339b6d09c6795453b9e42 (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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
extern int winx, winy;

typedef unsigned char Byte;

// SDL functions: remiplement these
//void swapbuffers();
//void refresh();
long int getTicks();



// drawing & geom settings...
extern CgUtil cgSettings;
extern GeoSettings geoSettings; // singleton

extern bool bilinear;
extern bool MovingLightMode;

extern bool draw_balls; // just to test 
extern bool draw_sticks; // just to test 
extern bool draw_wireframe_sticks;
extern bool draw_wireframe_balls;

extern bool use_accurate_halo;

void setAniStep(double step);
void stopAni();

int InitQuteMol(const char * filename);

#define ERRGL_OK 0
#define ERRGL_NO_FS 1
#define ERRGL_NO_VS 2
#define ERRGL_NO_FBO_SHADOWMAP 4
#define ERRGL_NO_FBO_HALO 8
#define ERRGL_NO_FBO_AO 16
#define ERRGL_NO_GLEW 32

// returns an ERRGL code
int initGl();

void drawFrame(int quality);
void clearFrame();
void UpdateShadowmap();

int GetCurrentHetatm();

int GetCurrentAtm();

void SetTextureAccess(bool bilinear);
//void ReloadTexture(vector<Byte> t, bool bilinear);

Byte* GetSnapshot(int sx, int sy, bool alpha);

//extern Mol mol;
//extern ShadowMap shadowmap;
extern CgUtil shadowSettings; 

extern  float background;

void StartTime();
long int TakeTime(FILE *f, char *st);
long int TakeTotalTime();
void  Cycle(  float &c, float min, float max, float step);

void SetColMode(float mode);
float GetColMode();
void ResetColMode();

void ChangeColorSchema(int i=-1);



//extern vector<Byte> texture;

//bool LoadImagePPM( const char * filename , vector<Byte> &im);
//bool SaveImagePPM( const char * filename , const vector<Byte> &im, int sizex, int sizey);