/[gzz]/gzz/gfx/libutil/Irregu.hxx
ViewVC logotype

Diff of /gzz/gfx/libutil/Irregu.hxx

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by jvk, Tue Nov 12 09:53:49 2002 UTC revision 1.9 by jvk, Wed Nov 13 14:10:09 2002 UTC
# Line 19  namespace Irregu { Line 19  namespace Irregu {
19      template <class T>      template <class T>
20      void nop(T t) {};      void nop(T t) {};
21    
22        inline void texCoord(ZPt p) {
23            glTexCoord3f(p.x, p.y, p.z);
24        }
25    
26      inline void texCoord(ZPt p, float q) {      inline void texCoord(ZPt p, float q) {
27          glTexCoord4f(p.x, p.y, p.z, q);          glTexCoord4f(p.x, p.y, p.z, q);
28      }      }
# Line 48  namespace Irregu { Line 52  namespace Irregu {
52      const unsigned SLICE_1D      = 16;      const unsigned SLICE_1D      = 16;
53      const unsigned SLICE_2D      = 32;      const unsigned SLICE_2D      = 32;
54      const unsigned SHIFTS        = 64;      const unsigned SHIFTS        = 64;
55        const unsigned INSIDE        = 128;
56    
57      template <class Coords>      template <class Coords>
58      void fill(Coords &coords, ZPt center,      void fill(Coords &coords, ZPt center,
# Line 98  namespace Irregu { Line 103  namespace Irregu {
103              vert2[i][1] = coords.transform(vert[i][1]);              vert2[i][1] = coords.transform(vert[i][1]);
104          }          }
105    
106            if (flags & INSIDE) {
107                colorfv(c0);
108                glBegin(GL_POLYGON);
109                for (unsigned i = 0; i < pt.size(); i++) {
110                    texCoord(vert[i][0]);
111                    coords.vertex(vert[i][0]);
112                }
113                glEnd();
114            }
115    
116          if (flags & SLICE_2D) {          if (flags & SLICE_2D) {
117              glBegin(GL_QUAD_STRIP);              glBegin(GL_QUAD_STRIP);
118              for (unsigned i = 0; i < pt.size(); i++) {              for (unsigned i = 0; i < pt.size(); i++) {

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26