gzz-commits
[Top][All Lists]
Advanced

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

[Gzz-commits] gzz/gzz/vob RectBgVob.java


From: Benja Fallenstein
Subject: [Gzz-commits] gzz/gzz/vob RectBgVob.java
Date: Sun, 22 Sep 2002 12:30:12 -0400

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Benja Fallenstein <address@hidden>      02/09/22 12:30:12

Modified files:
        gzz/vob        : RectBgVob.java 

Log message:
        Correct cell bg colors in gl client

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/vob/RectBgVob.java.diff?tr1=1.12&tr2=1.13&r1=text&r2=text

Patches:
Index: gzz/gzz/vob/RectBgVob.java
diff -c gzz/gzz/vob/RectBgVob.java:1.12 gzz/gzz/vob/RectBgVob.java:1.13
*** gzz/gzz/vob/RectBgVob.java:1.12     Fri Sep 13 07:36:11 2002
--- gzz/gzz/vob/RectBgVob.java  Sun Sep 22 12:30:11 2002
***************
*** 39,45 ****
   */
  
  public class RectBgVob extends Vob {
! public static final String rcsid = "$Id: RectBgVob.java,v 1.12 2002/09/13 
11:36:11 benja Exp $";
      public static boolean dbg = false;
      static final void p(String s) { if(dbg) System.out.println(s); }
      static final void pa(String s) { System.out.println(s); }
--- 39,45 ----
   */
  
  public class RectBgVob extends Vob {
! public static final String rcsid = "$Id: RectBgVob.java,v 1.13 2002/09/22 
16:30:11 benja Exp $";
      public static boolean dbg = false;
      static final void p(String s) { if(dbg) System.out.println(s); }
      static final void pa(String s) { System.out.println(s); }
***************
*** 99,113 ****
                                int coordsys2) {
          if(dbg) pa("Addtolistgl rectbg "+coordsys1);
        if(glList == null) {
            glList = GZZGL.createCallListCoorded(
                  "PushAttrib ENABLE_BIT\n"+
                  "Disable TEXTURE_2D\n"+
  
!               "Color "+ColorUtil.colorGLString(bg)+" 1\n" +
!               "Begin QUAD_STRIP\n"+
!               "Vertex 1 1\nVertex 1 -1\n"+
!               "Vertex -1 1\nVertex -1 -1\n"+
!               "End\n"+
  
                "Color 0 0 0 1\n"+
                "Begin LINE_STRIP\n"+
--- 99,135 ----
                                int coordsys2) {
          if(dbg) pa("Addtolistgl rectbg "+coordsys1);
        if(glList == null) {
+           String bgcall = "";
+           if(nsolids > 0) {
+               double w = 2.0 / nsolids;
+ 
+               for(int i=0; i<nsolids; i++) {
+                   double x1 = i*w - 1;
+                   double x2 = x1 + w;
+                   Color c = solids[i];
+                     bgcall += (
+                       "Color "+ColorUtil.colorGLString(solids[i])+" 1\n"+
+                       "Begin QUAD_STRIP\n"+
+                       "Vertex "+x1+" 1\n" +
+                       "Vertex "+x1+" -1\n"+
+                       "Vertex "+x2+" 1\n"+
+                       "Vertex "+x2+" -1\n"+
+                       "End\n");
+               }
+           } else {
+               bgcall = (
+                   "Color "+ColorUtil.colorGLString(bg)+" 1\n" +
+                   "Begin QUAD_STRIP\n"+
+                   "Vertex 1 1\nVertex 1 -1\n"+
+                   "Vertex -1 1\nVertex -1 -1\n"+
+                   "End\n");
+           }
+ 
            glList = GZZGL.createCallListCoorded(
                  "PushAttrib ENABLE_BIT\n"+
                  "Disable TEXTURE_2D\n"+
  
!               bgcall +
  
                "Color 0 0 0 1\n"+
                "Begin LINE_STRIP\n"+




reply via email to

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