| 1 | extern int winx, winy; |
| 2 | |
| 3 | typedef unsigned char Byte; |
| 4 | |
| 5 | // SDL functions: remiplement these |
| 6 | //void swapbuffers(); |
| 7 | //void refresh(); |
| 8 | long int getTicks(); |
| 9 | |
| 10 | |
| 11 | |
| 12 | // drawing & geom settings... |
| 13 | extern CgUtil cgSettings; |
| 14 | extern GeoSettings geoSettings; // singleton |
| 15 | |
| 16 | extern bool bilinear; |
| 17 | extern bool MovingLightMode; |
| 18 | |
| 19 | extern bool draw_balls; // just to test |
| 20 | extern bool draw_sticks; // just to test |
| 21 | extern bool draw_wireframe_sticks; |
| 22 | extern bool draw_wireframe_balls; |
| 23 | |
| 24 | extern bool use_accurate_halo; |
| 25 | |
| 26 | void setAniStep(double step); |
| 27 | void stopAni(); |
| 28 | |
| 29 | int InitQuteMol(const char * filename); |
| 30 | |
| 31 | #define ERRGL_OK 0 |
| 32 | #define ERRGL_NO_FS 1 |
| 33 | #define ERRGL_NO_VS 2 |
| 34 | #define ERRGL_NO_FBO_SHADOWMAP 4 |
| 35 | #define ERRGL_NO_FBO_HALO 8 |
| 36 | #define ERRGL_NO_FBO_AO 16 |
| 37 | #define ERRGL_NO_GLEW 32 |
| 38 | |
| 39 | // returns an ERRGL code |
| 40 | int initGl(); |
| 41 | |
| 42 | void drawFrame(int quality); |
| 43 | void clearFrame(); |
| 44 | void UpdateShadowmap(); |
| 45 | |
| 46 | int GetCurrentHetatm(); |
| 47 | |
| 48 | int GetCurrentAtm(); |
| 49 | |
| 50 | void SetTextureAccess(bool bilinear); |
| 51 | //void ReloadTexture(vector<Byte> t, bool bilinear); |
| 52 | |
| 53 | Byte* GetSnapshot(int sx, int sy, bool alpha); |
| 54 | |
| 55 | //extern Mol mol; |
| 56 | //extern ShadowMap shadowmap; |
| 57 | extern CgUtil shadowSettings; |
| 58 | |
| 59 | extern float background; |
| 60 | |
| 61 | void StartTime(); |
| 62 | long int TakeTime(FILE *f, char *st); |
| 63 | long int TakeTotalTime(); |
| 64 | void Cycle( float &c, float min, float max, float step); |
| 65 | |
| 66 | void SetColMode(float mode); |
| 67 | float GetColMode(); |
| 68 | void ResetColMode(); |
| 69 | |
| 70 | void ChangeColorSchema(int i=-1); |
| 71 | |
| 72 | |
| 73 | |
| 74 | //extern vector<Byte> texture; |
| 75 | |
| 76 | //bool LoadImagePPM( const char * filename , vector<Byte> &im); |
| 77 | //bool SaveImagePPM( const char * filename , const vector<Byte> &im, int sizex, int sizey); |
| 78 | |
| 79 |