Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

gl2opengl.h

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

Generated on Thu Jul 31 15:33:46 2003 for eFLTK by doxygen1.2.15