[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz doc/gl/Mipzip.rst gzz/gfx/gl/MipzipLoader.java
From: |
Tuomas J. Lukka |
Subject: |
[Gzz-commits] gzz doc/gl/Mipzip.rst gzz/gfx/gl/MipzipLoader.java |
Date: |
Thu, 16 Jan 2003 09:37:51 -0500 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Tuomas J. Lukka <address@hidden> 03/01/16 09:37:51
Modified files:
doc/gl : Mipzip.rst
gzz/gfx/gl : MipzipLoader.java
Log message:
More mipzip
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/doc/gl/Mipzip.rst.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/gfx/gl/MipzipLoader.java.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
Patches:
Index: gzz/doc/gl/Mipzip.rst
diff -u gzz/doc/gl/Mipzip.rst:1.2 gzz/doc/gl/Mipzip.rst:1.3
--- gzz/doc/gl/Mipzip.rst:1.2 Thu Jan 16 08:25:56 2003
+++ gzz/doc/gl/Mipzip.rst Thu Jan 16 09:37:51 2003
@@ -12,3 +12,29 @@
Due to the requirements of memory handling and GL threads,
we need to separate loading the mipmap level and teximaging
it.
+
+.. UML:: mipziploader
+
+ jlinkpackage gzz.gfx.gl
+
+ class MipzipLoader
+ jlink
+ fields
+ File mipzipFile
+ ZipFile openedFile
+ Texture tex
+ String texFormat
+ assoc compos - multi(n) MipzipLoader.Level
+
+ class MipzipLoader.Level
+ jlink
+ fields
+ int levelNo
+ Dimension size
+ byte[] loadedData
+ methods
+ void loadData()
+ void texImage()
+
+ ---
+ horizontally(80, foo, MipzipLoader, MipzipLoader.Level);
Index: gzz/gzz/gfx/gl/MipzipLoader.java
diff -u gzz/gzz/gfx/gl/MipzipLoader.java:1.2
gzz/gzz/gfx/gl/MipzipLoader.java:1.3
--- gzz/gzz/gfx/gl/MipzipLoader.java:1.2 Thu Jan 16 08:25:56 2003
+++ gzz/gzz/gfx/gl/MipzipLoader.java Thu Jan 16 09:37:51 2003
@@ -10,20 +10,67 @@
* compressed mipmap levels.
*/
public class MipzipLoader {
- File mipzipFile;
+
+
+ /** The file in which the mipmaps are stored.
+ */
+ private final File mipzipFile;
+
+ /** The texture.
+ */
+ private final GL.Texture tex;
/** The compressed format.
*/
- String texFormat;
+ private final String texFormat;
+
+ /** The opened Zip file. At any given
+ * time, may be null or open.
+ * Use getZipFile() to get it inside these classes.
+ */
+ private ZipFile zip;
+
+ synchronized private ZipFile getZipFile() throws IOException {
+ if(zip == null)
+ zip = new ZipFile(mipzipFile);
+ return zip;
+ }
/** A single mipmap level.
*/
class Level {
+ /** The index of this level.
+ */
+ int level;
+
/** Sizes of the mipmap levels.
*/
Dimension size;
+ /** The data loaded from the disk.
+ */
+ byte[] loadedData;
+
+ /** Load the data for this mipmap level
+ * synchronously.
+ */
+ synchronized void loadData() throws IOException {
+ if(loadedData != null) return;
+ ZipFile f = getZipFile();
+ ZipEntry e = f.getEntry(""+level);
+
+ }
+
+ synchronized void texImage() {
+ }
+
+ }
+
+ public MipzipLoader(File f) {
+ this.mipzipFile = f;
+ this.tex = GL.createTexture();
+ this.texFormat = "";
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gzz-commits] gzz doc/gl/Mipzip.rst gzz/gfx/gl/MipzipLoader.java,
Tuomas J. Lukka <=