gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] gzz/gfx/liblines Lines.cxx


From: Matti Katila
Subject: [Gzz-commits] gzz/gfx/liblines Lines.cxx
Date: Sat, 02 Nov 2002 15:27:23 -0500

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Matti Katila <address@hidden>   02/11/02 15:27:22

Modified files:
        gfx/liblines   : Lines.cxx 

Log message:
        Have you got eyeglasses?

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/liblines/Lines.cxx.diff?tr1=1.9&tr2=1.10&r1=text&r2=text

Patches:
Index: gzz/gfx/liblines/Lines.cxx
diff -u gzz/gfx/liblines/Lines.cxx:1.9 gzz/gfx/liblines/Lines.cxx:1.10
--- gzz/gfx/liblines/Lines.cxx:1.9      Sat Nov  2 15:08:08 2002
+++ gzz/gfx/liblines/Lines.cxx  Sat Nov  2 15:27:22 2002
@@ -94,8 +94,6 @@
          glEnable(GL_BLEND);
            glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
 
-           //glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
-
        if (has_not_inited) init();
 
 
@@ -103,20 +101,22 @@
 
        glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
 
-       float l = linewidth /2;
+       float l = linewidth/2;
+       float texcoord =1;
+       texcoord *=  (l+1)/l;
 
        glBegin(GL_QUADS);
          
            glTexCoord2f(0,0);
-           glVertex3f(a.x - 1 -l, a.y - 1-l, 0);
+           glVertex3f(a.x - 1 -l, a.y - 1 - l, 0);
 
-           glTexCoord2f(1,0);
+           glTexCoord2f(texcoord,0);
            glVertex3f(a.x + 1 + l, a.y + 1 + l, 0);
 
-           glTexCoord2f(1,1);
-           glVertex3f(b.x + 1 +l, b.y + 1 + l, 0);
+           glTexCoord2f(texcoord, texcoord);
+           glVertex3f(b.x + 1 + l, b.y + 1 + l, 0);
 
-           glTexCoord2f(0,1);
+           glTexCoord2f(0, texcoord);
            glVertex3f(b.x - 1-l, b.y - 1 - l, 0);
 
        glEnd();




reply via email to

[Prev in Thread] Current Thread [Next in Thread]