00001
00002
00003
00004
00005
00006
00007
00008
00009 #include <FL/gl.h>
00010 #include "gl_draw.H"
00011
00012 inline void clear() {glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);}
00013 #define RGBcolor(r,g,b) glColor3ub(r,g,b)
00014 #define bgnline() glBegin(GL_LINE_STRIP)
00015 #define bgnpolygon() glBegin(GL_POLYGON)
00016 #define bgnclosedline() glBegin(GL_LINE_LOOP)
00017 #define endline() glEnd()
00018 #define endpolygon() glEnd()
00019 #define endclosedline() glEnd()
00020 #define v2f(v) glVertex2fv(v)
00021 #define v2s(v) glVertex2sv(v)
00022 #define cmov(x,y,z) glRasterPos3f(x,y,z)
00023 #define charstr(s) gl_draw(s)
00024 #define fmprstr(s) gl_draw(s)
00025 typedef float Matrix[4][4];
00026 inline void pushmatrix() {glPushMatrix();}
00027 inline void popmatrix() {glPopMatrix();}
00028 inline void multmatrix(Matrix m) {glMultMatrixf((float *)m);}
00029 inline void color(int n) {glIndexi(n);}
00030 inline void rect(int x,int y,int r,int t) {gl_rect(x,y,r-x,t-y);}
00031 inline void rectf(int x,int y,int r,int t) {glRectf(x,y,r+1,t+1);}
00032 inline void recti(int x,int y,int r,int t) {gl_rect(x,y,r-x,t-y);}
00033 inline void rectfi(int x,int y,int r,int t) {glRecti(x,y,r+1,t+1);}
00034 inline void rects(int x,int y,int r,int t) {gl_rect(x,y,r-x,t-y);}
00035 inline void rectfs(int x,int y,int r,int t) {glRects(x,y,r+1,t+1);}