fenfire-commits
[Top][All Lists]
Advanced

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

[ff-cvs] libvob org/nongnu/libvob/gl/MipzipLoader.java v...


From: Tuomas J. Lukka
Subject: [ff-cvs] libvob org/nongnu/libvob/gl/MipzipLoader.java v...
Date: Mon, 18 Aug 2003 05:44:08 -0400

CVSROOT:        /cvsroot/libvob
Module name:    libvob
Branch:         
Changes by:     Tuomas J. Lukka <address@hidden>        03/08/18 05:44:08

Modified files:
        org/nongnu/libvob/gl: MipzipLoader.java 
        vob/putil      : mipzipmaker.py 

Log message:
        filt

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/org/nongnu/libvob/gl/MipzipLoader.java.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/putil/mipzipmaker.py.diff?tr1=1.4&tr2=1.5&r1=text&r2=text

Patches:
Index: libvob/org/nongnu/libvob/gl/MipzipLoader.java
diff -u libvob/org/nongnu/libvob/gl/MipzipLoader.java:1.4 
libvob/org/nongnu/libvob/gl/MipzipLoader.java:1.5
--- libvob/org/nongnu/libvob/gl/MipzipLoader.java:1.4   Thu Jun 26 04:51:47 2003
+++ libvob/org/nongnu/libvob/gl/MipzipLoader.java       Mon Aug 18 05:44:08 2003
@@ -92,6 +92,16 @@
      */
     public final float origWidth, origHeight;
 
+    private String filterSettings;
+
+    /** Set the callgl string for filtering the texture.
+     * The texture should be assumed to be loaded to TEXTURE_2D already.
+     */
+    public void setFilterSettings(String s) {
+       filterSettings = s;
+       reFilter();
+    }
+
     /** Open (if not already open) and return the ZipFile.
      */
     synchronized private ZipFile getZipFile() throws IOException {
@@ -251,6 +261,7 @@
                levels[j].wasDiscarded();
            GLUtil.reloadCompressed(tex, 
                        currentBaseLevel, levels.length);
+           reFilter();
        }
        for(int i=currentBaseLevel; i<levels.length; i++) {
            levels[i].loadData();
@@ -351,6 +362,7 @@
 
                GLUtil.reloadCompressed(tex, 
                            goalBaseLevel, levels.length);
+               reFilter();
                if(currentBaseLevel < goalBaseLevel)
                    setBaseLevel(goalBaseLevel);
                else
@@ -392,6 +404,14 @@
      */
     public GL.Texture getTexture() {
        return tex;
+    }
+
+    /** CallGL to set the texture filters right.
+     */
+    private void reFilter() {
+       GL.call("BindTexture TEXTURE_2D "+tex.getTexId()+"\n"+
+               filterSettings+"\n"+
+               "BindTexture TEXTURE_2D 0\n");
     }
 
     /** Get the amount of memory currently used.
Index: libvob/vob/putil/mipzipmaker.py
diff -u libvob/vob/putil/mipzipmaker.py:1.4 libvob/vob/putil/mipzipmaker.py:1.5
--- libvob/vob/putil/mipzipmaker.py:1.4 Mon Aug 18 03:46:15 2003
+++ libvob/vob/putil/mipzipmaker.py     Mon Aug 18 05:44:08 2003
@@ -30,6 +30,8 @@
 #
 #   make runjython DBG="gfx/util/mipzipmaker.py  ../tmpimg/*-170-*[0-9]"
 
+# Can also be used as a python module - fenfire does this automatically
+
 import sys
 import getopt
 from java.lang import Runnable, System




reply via email to

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