[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz/gfx/libcoords Coords.cxx
From: |
Matti Katila |
Subject: |
[Gzz-commits] gzz/gfx/libcoords Coords.cxx |
Date: |
Wed, 22 Jan 2003 09:24:52 -0500 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Matti Katila <address@hidden> 03/01/22 09:24:51
Modified files:
gfx/libcoords : Coords.cxx
Log message:
Culling debug adjustement.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libcoords/Coords.cxx.diff?tr1=1.61&tr2=1.62&r1=text&r2=text
Patches:
Index: gzz/gfx/libcoords/Coords.cxx
diff -u gzz/gfx/libcoords/Coords.cxx:1.61 gzz/gfx/libcoords/Coords.cxx:1.62
--- gzz/gfx/libcoords/Coords.cxx:1.61 Wed Jan 15 09:14:44 2003
+++ gzz/gfx/libcoords/Coords.cxx Wed Jan 22 09:24:51 2003
@@ -15,6 +15,7 @@
DBGVAR(dbg, "Coords.general");
DBGVAR(dbg_buoy, "Coords.buoy");
DBGVAR(dbg_cull, "Coords.culling");
+DBGVAR(dbg_cull_show, "Coords.show_culling");
// The (STL-like) concept of transform:
// enum { NParams = n };
@@ -1019,25 +1020,26 @@
DBG(dbg_cull) << "called CullingCoordsys::parallellRectIntersect\n";
DBG(dbg_cull) << "(" << p1.x << "," << p1.y << "), (" << p2.x << ","
<< p2.y << ") <=> ("
<< p3.x << "," << p3.y << "), (" << p4.x << "," << p4.y
<< ")\n";
-
- /*
+
+ if (dbg_cull_show) {
+
glLineWidth(1);
- glColor3f(1, 1, 1);
glDisable(GL_TEXTURE_2D);
+ glColor3f(0, 1, 0);
glBegin(GL_LINE_LOOP);
- glVertex3f(p1.x, p1.y,0);
- glVertex3f(p1.x, p2.y,0);
- glVertex3f(p2.x, p2.y,0);
- glVertex3f(p2.x, p1.y,0);
+ glVertex3f(p1.x, p1.y, 100);
+ glVertex3f(p1.x, p2.y, 100);
+ glVertex3f(p2.x, p2.y, 100);
+ glVertex3f(p2.x, p1.y, 100);
glEnd();
glColor3f(1, 0 , 1);
glBegin(GL_LINE_LOOP);
- glVertex3f(p3.x, p3.y,0);
- glVertex3f(p3.x, p4.y,0);
- glVertex3f(p4.x, p4.y,0);
- glVertex3f(p4.x, p3.y,0);
+ glVertex3f(p3.x, p3.y, 100);
+ glVertex3f(p3.x, p4.y, 100);
+ glVertex3f(p4.x, p4.y, 100);
+ glVertex3f(p4.x, p3.y, 100);
glEnd();
- */
+ }
return (p2.x > p3.x) && (p4.x > p1.x) && (p2.y > p3.y) && (p4.y >
p1.y);
}
@@ -1161,7 +1163,7 @@
return super->getInverse();
}
virtual void vertex(const ZPt &p) const {
- DBG(dbg_cull) << "called CullingCoordsys::vertex\n";
+ //DBG(dbg_cull) << "called CullingCoordsys::vertex\n";
super->vertex(p);
}
virtual ZPt transform(const ZPt &p) const {
- [Gzz-commits] gzz/gfx/libcoords Coords.cxx,
Matti Katila <=