FLTK 1.4.4
Toggle main menu visibility
Loading...
Searching...
No Matches
gl2opengl.h
1
/* gl.h
2
3
GL to OpenGL translator.
4
If you include this, you might be able to port old GL programs.
5
There are also much better emulators available on the net.
6
7
*/
8
9
#ifndef _FL_gl2opengl_h_
10
#define _FL_gl2opengl_h_
11
12
#include <
FL/gl.h
>
13
#include "gl_draw.H"
14
15
inline
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)
28
typedef
float
Matrix[4][4];
29
inline
void
pushmatrix() {glPushMatrix();}
30
inline
void
popmatrix() {glPopMatrix();}
31
inline
void
multmatrix(Matrix m) {glMultMatrixf((
float
*)m);}
32
inline
void
color(
int
n) {glIndexi(n);}
33
inline
void
rect(
int
x,
int
y,
int
r,
int
t) {
gl_rect
(x,y,r-x,t-y);}
34
inline
void
rectf(
int
x,
int
y,
int
r,
int
t) {glRectf(x,y,r+1,t+1);}
35
inline
void
recti(
int
x,
int
y,
int
r,
int
t) {
gl_rect
(x,y,r-x,t-y);}
36
inline
void
rectfi(
int
x,
int
y,
int
r,
int
t) {glRecti(x,y,r+1,t+1);}
37
inline
void
rects(
int
x,
int
y,
int
r,
int
t) {
gl_rect
(x,y,r-x,t-y);}
38
inline
void
rectfs(
int
x,
int
y,
int
r,
int
t) {glRects(x,y,r+1,t+1);}
39
40
#endif
/* _FL_gl2opengl_h_ */
gl.h
This file defines wrapper functions for OpenGL in FLTK.
gl_rect
void gl_rect(int x, int y, int w, int h)
Outlines the given rectangle with the current color.
Definition
gl_draw.cxx:216
FL
gl2opengl.h
Generated by
1.17.0