fenfire-commits
[Top][All Lists]
Advanced

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

[ff-cvs] libvob org/nongnu/libvob/vobs/SolidBackdropVob....


From: Tuomas J. Lukka
Subject: [ff-cvs] libvob org/nongnu/libvob/vobs/SolidBackdropVob....
Date: Mon, 25 Aug 2003 03:02:33 -0400

CVSROOT:        /cvsroot/libvob
Module name:    libvob
Branch:         
Changes by:     Tuomas J. Lukka <address@hidden>        03/08/25 03:02:33

Modified files:
        org/nongnu/libvob/vobs: SolidBackdropVob.java TextVob.java 
        src/texture    : ppbg1.texture 
        vob/buoy       : buoymanager.py 
        vob/putil      : demo.py 
Added files:
        vob/demo       : texlab.py 

Log message:
        Arch: allow more flexible solidbg, try to make nicer bg

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/org/nongnu/libvob/vobs/SolidBackdropVob.java.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/org/nongnu/libvob/vobs/TextVob.java.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/src/texture/ppbg1.texture.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/buoy/buoymanager.py.diff?tr1=1.64&tr2=1.65&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/demo/texlab.py?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/putil/demo.py.diff?tr1=1.18&tr2=1.19&r1=text&r2=text

Patches:
Index: libvob/org/nongnu/libvob/vobs/SolidBackdropVob.java
diff -u libvob/org/nongnu/libvob/vobs/SolidBackdropVob.java:1.3 
libvob/org/nongnu/libvob/vobs/SolidBackdropVob.java:1.4
--- libvob/org/nongnu/libvob/vobs/SolidBackdropVob.java:1.3     Tue Apr  8 
16:25:02 2003
+++ libvob/org/nongnu/libvob/vobs/SolidBackdropVob.java Mon Aug 25 03:02:32 2003
@@ -2,21 +2,22 @@
 SolidBackdropVob.java
  *    
  *    Copyright (c) 2002, Matti Katila and Tuomas J. Lukka
+ *    Copyright (c) 2003, Tuomas J. Lukka
  *    
- *    This file is part of Gzz.
+ *    This file is part of Libvob.
  *    
- *    Gzz is free software; you can redistribute it and/or modify it under
+ *    Libvob is free software; you can redistribute it and/or modify it under
  *    the terms of the GNU Lesser General Public License as published by
  *    the Free Software Foundation; either version 2 of the License, or
  *    (at your option) any later version.
  *    
- *    Gzz is distributed in the hope that it will be useful, but WITHOUT
+ *    Libvob is distributed in the hope that it will be useful, but WITHOUT
  *    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  *    or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General
  *    Public License for more details.
  *    
  *    You should have received a copy of the GNU Lesser General
- *    Public License along with Gzz; if not, write to the Free
+ *    Public License along with Libvob; if not, write to the Free
  *    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  *    MA  02111-1307  USA
  *    
@@ -44,6 +45,8 @@
     public Color color;
 
     /** Create a new SolidBackdropVob.
+     * @param color The color to clear to. If null, color buffer will not be 
cleared
+     *                         on OpenGL.
      */
     public SolidBackdropVob(Color color) {
        this.color = color;
@@ -64,23 +67,34 @@
 
     // GL
     private String getGLStr() {
-       return
-           "ClearColor " + ColorUtil.colorGLString(color) + " 0\n"+
-           "ColorMask 1 1 1 1\n"+
-           "DepthMask 1\n"+
-           "StencilMask 255\n"+
-           "Clear COLOR_BUFFER_BIT DEPTH_BUFFER_BIT STENCIL_BUFFER_BIT\n"+
-           "Enable TEXTURE_2D\n"+
-           "Enable ALPHA_TEST\n"+
-           "AlphaFunc GREATER 0.1\n"+
-           "Disable BLEND\n"+  // Don't want to enable this by default
-                               // as it's fairly expensive
-           "Enable DEPTH_TEST\n"+
-           "DepthFunc LEQUAL\n"+
-           "BlendFunc SRC_ALPHA ONE_MINUS_SRC_ALPHA\n"+
-           "Color 0 0 0 1\n"+
-           "";
-        
+       String common = 
+               "Disable TEXTURE_2D\n"+
+               "Enable ALPHA_TEST\n"+
+               "AlphaFunc GREATER 0.1\n"+
+               "Disable BLEND\n"+  // Don't want to enable this by default
+                                   // as it's fairly expensive
+               "Enable DEPTH_TEST\n"+
+               "DepthFunc LEQUAL\n"+
+               "BlendFunc SRC_ALPHA ONE_MINUS_SRC_ALPHA\n"+
+               "Color 0 0 0 1\n"+
+               "";
+       if(color != null) {
+           return
+               "ClearColor " + ColorUtil.colorGLString(color) + " 0\n"+
+               "ColorMask 1 1 1 1\n"+
+               "DepthMask 1\n"+
+               "StencilMask 255\n"+
+               "Clear COLOR_BUFFER_BIT DEPTH_BUFFER_BIT STENCIL_BUFFER_BIT\n"+
+               common;
+       } else {
+           return 
+               "ColorMask 1 1 1 1\n"+
+               "DepthMask 1\n"+
+               "StencilMask 255\n"+
+               "Clear DEPTH_BUFFER_BIT STENCIL_BUFFER_BIT\n"+
+               common;
+       }
+           
     }
 
     Vob glList;
Index: libvob/org/nongnu/libvob/vobs/TextVob.java
diff -u libvob/org/nongnu/libvob/vobs/TextVob.java:1.7 
libvob/org/nongnu/libvob/vobs/TextVob.java:1.8
--- libvob/org/nongnu/libvob/vobs/TextVob.java:1.7      Mon Aug 11 10:14:07 2003
+++ libvob/org/nongnu/libvob/vobs/TextVob.java  Mon Aug 25 03:02:32 2003
@@ -54,7 +54,7 @@
  * XXX Diagram!
  */
 public class TextVob extends HBox.VobHBox {
-String rcsid = "$Id: TextVob.java,v 1.7 2003/08/11 14:14:07 mudyc Exp $";
+String rcsid = "$Id: TextVob.java,v 1.8 2003/08/25 07:02:32 tjl Exp $";
     public static boolean dbg = false;
     private static void pa(String s) { System.err.println(s); }
 
@@ -183,6 +183,7 @@
            if (GL.hasExtension("GL_NV_register_combiners")) {
                start = GLCache.getCallList(
 "   PushAttrib ENABLE_BIT TEXTURE_BIT CURRENT_BIT  \n"+
+"   Enable TEXTURE_2D                  \n" +
 "   Enable REGISTER_COMBINERS_NV                       \n" +
 "   Enable BLEND                       \n" +
 "   CombinerParameterNV NUM_GENERAL_COMBINERS_NV 1     \n" +
Index: libvob/src/texture/ppbg1.texture
diff -u libvob/src/texture/ppbg1.texture:1.1 
libvob/src/texture/ppbg1.texture:1.2
--- libvob/src/texture/ppbg1.texture:1.1        Mon Mar 10 00:38:19 2003
+++ libvob/src/texture/ppbg1.texture    Mon Aug 25 03:02:33 2003
@@ -3,20 +3,20 @@
  *    
  *    Copyright (c) 2003, Janne Kujala and Tuomas J. Lukka
  *    
- *    This file is part of Gzz.
+ *    This file is part of Libvob.
  *    
- *    Gzz is free software; you can redistribute it and/or modify it under
+ *    Libvob is free software; you can redistribute it and/or modify it under
  *    the terms of the GNU Lesser General Public License as published by
  *    the Free Software Foundation; either version 2 of the License, or
  *    (at your option) any later version.
  *    
- *    Gzz is distributed in the hope that it will be useful, but WITHOUT
+ *    Libvob is distributed in the hope that it will be useful, but WITHOUT
  *    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  *    or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General
  *    Public License for more details.
  *    
  *    You should have received a copy of the GNU Lesser General
- *    Public License along with Gzz; if not, write to the Free
+ *    Public License along with Libvob; if not, write to the Free
  *    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  *    MA  02111-1307  USA
  *    
Index: libvob/vob/buoy/buoymanager.py
diff -u libvob/vob/buoy/buoymanager.py:1.64 libvob/vob/buoy/buoymanager.py:1.65
--- libvob/vob/buoy/buoymanager.py:1.64 Sat Aug 23 09:25:22 2003
+++ libvob/vob/buoy/buoymanager.py      Mon Aug 25 03:02:33 2003
@@ -233,8 +233,6 @@
     def scene(self, vs):
        self.vs = vs
 
-       vs.put(background((.36, .74, 1.0)))
-
        geoms = self.geometer.place(vs)
 
        for i in range(0, len(self.singles)):
Index: libvob/vob/putil/demo.py
diff -u libvob/vob/putil/demo.py:1.18 libvob/vob/putil/demo.py:1.19
--- libvob/vob/putil/demo.py:1.18       Sun Aug 17 06:04:10 2003
+++ libvob/vob/putil/demo.py    Mon Aug 25 03:02:33 2003
@@ -197,9 +197,9 @@
        global showHelp, currentScene
        print "KEY: '%s'"%s
        if usingNormalBindings:
-           if s == "q" or s == "Q":
+           if s == "q" or s == "Q" or s == "Ctrl-Q":
                System.exit(43)
-           elif s == "r" or s == "R":
+           elif s == "r" or s == "R" or s == "Ctrl-R":
                loadScenes()
            elif s == "?":
                showHelp = 1-showHelp




reply via email to

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