From 2ef9753588b02155faf8bc5a176e4fcf7489dae2 Mon Sep 17 00:00:00 2001 From: pixel Date: Fri, 14 Mar 2003 13:36:40 +0000 Subject: glcolor, first episode --- lib/glshape.cc | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'lib/glshape.cc') diff --git a/lib/glshape.cc b/lib/glshape.cc index cad1e36..6d88a15 100644 --- a/lib/glshape.cc +++ b/lib/glshape.cc @@ -7,7 +7,7 @@ #define ENTERT bool was2d = in2D(false) #define LEAVE out2D(was2d) -void mogltk::shape::box(int x1, int y1, int x2, int y2, Color c) { +void mogltk::shape::box(int x1, int y1, int x2, int y2, ColorP c) { ENTER; c.Bind(); @@ -21,7 +21,7 @@ void mogltk::shape::box(int x1, int y1, int x2, int y2, Color c) { LEAVE; } -void mogltk::shape::box(int x1, int y1, int x2, int y2, Color c1, Color c2, Color c3, Color c4) { +void mogltk::shape::box(int x1, int y1, int x2, int y2, ColorP c1, ColorP c2, ColorP c3, ColorP c4) { ENTER; glBegin(GL_TRIANGLE_STRIP); @@ -34,23 +34,23 @@ void mogltk::shape::box(int x1, int y1, int x2, int y2, Color c1, Color c2, Colo LEAVE; } -void mogltk::shape::hline(int x1, int x2, int y, Color c) { +void mogltk::shape::hline(int x1, int x2, int y, ColorP c) { box(x1, y, x2, y, c); } -void mogltk::shape::vline(int x, int y1, int y2, Color c) { +void mogltk::shape::vline(int x, int y1, int y2, ColorP c) { box(x, y1, x, y2, c); } -void mogltk::shape::hline(int x1, int x2, int y, Color c1, Color c2) { +void mogltk::shape::hline(int x1, int x2, int y, ColorP c1, ColorP c2) { box(x1, y, x2, y, c1, c2, c1, c2); } -void mogltk::shape::vline(int x, int y1, int y2, Color c1, Color c2) { +void mogltk::shape::vline(int x, int y1, int y2, ColorP c1, ColorP c2) { box(x, y1, x, y2, c1, c1, c2, c2); } -void mogltk::shape::obox(int x1, int y1, int x2, int y2, Color c) { +void mogltk::shape::obox(int x1, int y1, int x2, int y2, ColorP c) { ENTER; hline(x1, x2, y1, c); hline(x1, x2, y2, c); @@ -59,7 +59,7 @@ void mogltk::shape::obox(int x1, int y1, int x2, int y2, Color c) { LEAVE; } -void mogltk::shape::obox(int x1, int y1, int x2, int y2, Color c1, Color c2, Color c3, Color c4) { +void mogltk::shape::obox(int x1, int y1, int x2, int y2, ColorP c1, ColorP c2, ColorP c3, ColorP c4) { ENTER; hline(x1, x2, y1, c1, c2); hline(x1, x2, y2, c3, c4); @@ -68,15 +68,15 @@ void mogltk::shape::obox(int x1, int y1, int x2, int y2, Color c1, Color c2, Col LEAVE; } -void mogltk::shape::tbox(mogltk::texture * t, int x1, int y1, int x2, int y2, int tx, int ty, double f, Color c) { +void mogltk::shape::tbox(mogltk::texture * t, int x1, int y1, int x2, int y2, int tx, int ty, double f, ColorP c) { tbox(t, x1, y1, x2, y2, tx, ty, tx + (x2 - x1) * f, ty + (y2 - y1) * f, c); } -void mogltk::shape::tbox(mogltk::texture * t, int x1, int y1, int x2, int y2, Color c1, Color c2, Color c3, Color c4, int tx, int ty, double f) { +void mogltk::shape::tbox(mogltk::texture * t, int x1, int y1, int x2, int y2, ColorP c1, ColorP c2, ColorP c3, ColorP c4, int tx, int ty, double f) { tbox(t, x1, y1, x2, y2, c1, c2, c3, c4, tx, ty, tx + (x2 - x1) * f, ty + (y2 - y1) * f); } -void mogltk::shape::tbox(mogltk::texture * t, int x1, int y1, int x2, int y2, int tx1, int ty1, int tx2, int ty2, Color c) { +void mogltk::shape::tbox(mogltk::texture * t, int x1, int y1, int x2, int y2, int tx1, int ty1, int tx2, int ty2, ColorP c) { ENTERT; c.Bind(); @@ -91,7 +91,7 @@ void mogltk::shape::tbox(mogltk::texture * t, int x1, int y1, int x2, int y2, in LEAVE; } -void mogltk::shape::tbox(mogltk::texture * t, int x1, int y1, int x2, int y2, Color c1, Color c2, Color c3, Color c4, int tx1, int ty1, int tx2, int ty2) { +void mogltk::shape::tbox(mogltk::texture * t, int x1, int y1, int x2, int y2, ColorP c1, ColorP c2, ColorP c3, ColorP c4, int tx1, int ty1, int tx2, int ty2) { ENTERT; t->Bind(); -- cgit v1.2.3