9#ifndef _FL_gl2opengl_h_
10#define _FL_gl2opengl_h_
15inline void clear() {glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);}
16#define RGBcolor(r,g,b) glColor3ub(r,g,b)
17#define bgnline() glBegin(GL_LINE_STRIP)
18#define bgnpolygon() glBegin(GL_POLYGON)
19#define bgnclosedline() glBegin(GL_LINE_LOOP)
20#define endline() glEnd()
21#define endpolygon() glEnd()
22#define endclosedline() glEnd()
23#define v2f(v) glVertex2fv(v)
24#define v2s(v) glVertex2sv(v)
25#define cmov(x,y,z) glRasterPos3f(x,y,z)
26#define charstr(s) gl_draw(s)
27#define fmprstr(s) gl_draw(s)
28typedef float Matrix[4][4];
29inline void pushmatrix() {glPushMatrix();}
30inline void popmatrix() {glPopMatrix();}
31inline void multmatrix(Matrix m) {glMultMatrixf((
float *)m);}
32inline void color(
int n) {glIndexi(n);}
33inline void rect(
int x,
int y,
int r,
int t) {
gl_rect(x,y,r-x,t-y);}
34inline void rectf(
int x,
int y,
int r,
int t) {glRectf(x,y,r+1,t+1);}
35inline void recti(
int x,
int y,
int r,
int t) {
gl_rect(x,y,r-x,t-y);}
36inline void rectfi(
int x,
int y,
int r,
int t) {glRecti(x,y,r+1,t+1);}
37inline void rects(
int x,
int y,
int r,
int t) {
gl_rect(x,y,r-x,t-y);}
38inline void rectfs(
int x,
int y,
int r,
int t) {glRects(x,y,r+1,t+1);}
This file defines wrapper functions for OpenGL in FLTK.
void gl_rect(int x, int y, int w, int h)
Outlines the given rectangle with the current color.
Definition gl_draw.cxx:216