[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz ./TODO Documentation/VISION gfx/jni/GzzGL-j...
From: |
Tuomas J. Lukka |
Subject: |
[Gzz-commits] gzz ./TODO Documentation/VISION gfx/jni/GzzGL-j... |
Date: |
Thu, 16 Jan 2003 06:24:36 -0500 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Tuomas J. Lukka <address@hidden> 03/01/16 06:24:36
Modified files:
. : TODO
Documentation : VISION
gfx/jni : GzzGL-jni.cxx
gzz/gfx/gl : FileSetTextureMemoryConsumer.java GL.java
Added files:
gfx/util : texpacker.py
gzz/gfx/gl : MipzipLoader.java
Log message:
Mipzip files.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/TODO.diff?tr1=1.517&tr2=1.518&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/Documentation/VISION.diff?tr1=1.10&tr2=1.11&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/jni/GzzGL-jni.cxx.diff?tr1=1.75&tr2=1.76&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/util/texpacker.py?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/gfx/gl/MipzipLoader.java?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/gfx/gl/FileSetTextureMemoryConsumer.java.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/gfx/gl/GL.java.diff?tr1=1.37&tr2=1.38&r1=text&r2=text
Patches:
Index: gzz/Documentation/VISION
diff -u gzz/Documentation/VISION:1.10 gzz/Documentation/VISION:1.11
--- gzz/Documentation/VISION:1.10 Fri Nov 29 08:29:03 2002
+++ gzz/Documentation/VISION Thu Jan 16 06:24:36 2003
@@ -10,6 +10,10 @@
Tools for knowledge workers.
+LEGO philosophy: not single things that do lots of things in fixed
+ways but multiple, really simple things that can be used with
+imagination.
+
Free software.
- mostly LGPL, most valuable innovations GPL.
- if we ever acquire patents, we shall make a worldwide
Index: gzz/TODO
diff -u gzz/TODO:1.517 gzz/TODO:1.518
--- gzz/TODO:1.517 Thu Jan 16 04:57:36 2003
+++ gzz/TODO Thu Jan 16 06:24:36 2003
@@ -35,9 +35,10 @@
file is not zero-length though. Proper framework:
get pdf and ps file size.
- sane exception if ../mstmpimg isn't found
- + genimages: allow using different formats for generated images.
- Specifically, need to be able to use gzipped S3TC files;
- should be a LOT faster to load.
+ benja:
+ + DimDecorator's text is broken on GL-side. Like text seems to be
+ to tight to be readable. Probably problems with coordinate
+ systems? Other texts works fine.
tuukkah:
- get someone to try our main demos:
- paper
@@ -147,6 +148,9 @@
etc.
+ speed up tests: currently too much execfile().. could
pre-compile and exec compiled in the same globals().
+ + genimages: allow using different formats for generated images.
+ Specifically, need to be able to use gzipped S3TC files;
+ should be a LOT faster to load.
humppake:
- umltool paper dl 15.2., but should actually be done in the late Jan
- enhancing umltool
@@ -242,6 +246,7 @@
colors (not "not" tests but test that the
color really is right)
tjl:
+ - make saving/loading compressed textures in zip files easy.
- matrix inv!
- faster (asynch) loading of (pagespan) images
- move Image class (imageraster &c) out from Os-GLX.
Index: gzz/gfx/jni/GzzGL-jni.cxx
diff -u gzz/gfx/jni/GzzGL-jni.cxx:1.75 gzz/gfx/jni/GzzGL-jni.cxx:1.76
--- gzz/gfx/jni/GzzGL-jni.cxx:1.75 Sat Jan 11 06:47:50 2003
+++ gzz/gfx/jni/GzzGL-jni.cxx Thu Jan 16 06:24:36 2003
@@ -531,6 +531,38 @@
GLERR
}
+
+JNIEXPORT jbyteArray JNICALL
Java_gzz_gfx_gl_GL_impl_1Texture_1getCompressedTexImage
+ (JNIEnv *env, jclass, jint id, jint lod) {
+ int size;
+ glBindTexture(GL_TEXTURE_2D, id);
+ glGetTexLevelParameteriv(GL_TEXTURE_2D, lod,
GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB, &size);
+ GLERR;
+ jbyteArray arr = env->NewByteArray(size);
+ jbyte *b = env->GetByteArrayElements(arr, 0);
+ glGetCompressedTexImageARB(GL_TEXTURE_2D, lod, b);
+ env->ReleaseByteArrayElements(arr, b, 0);
+ glBindTexture(GL_TEXTURE_2D, 0);
+ GLERR;
+ return arr;
+}
+
+JNIEXPORT void JNICALL Java_gzz_gfx_gl_GL_impl_1Texture_1compressedTexImage
+ (JNIEnv *env, jclass, jint id, jint level, jstring jinternalFormat, jint
width, jint height,
+ jint border, jbyteArray jdata) {
+ int size = env->GetArrayLength(jdata);
+ jbyte *data = env->GetByteArrayElements(jdata, 0);
+ glBindTexture(GL_TEXTURE_2D, id);
+ GLenum internalFormat = tokenFromJstring(env, jinternalFormat);
+
+ glCompressedTexImage2DARB(GL_TEXTURE_2D, level, internalFormat,
+ width, height, border, size, data);
+ glBindTexture(GL_TEXTURE_2D, 0);
+ env->ReleaseByteArrayElements(jdata, data, 0);
+ GLERR;
+
+}
+
JNIEXPORT void JNICALL Java_gzz_gfx_gl_GL_impl_1Texture_1downsampleInto
(JNIEnv *env, jclass, jint id, jint intoid, jstring targetstr, jint level,
jstring internalFormat, jstring transferType)
{
Index: gzz/gzz/gfx/gl/FileSetTextureMemoryConsumer.java
diff -u gzz/gzz/gfx/gl/FileSetTextureMemoryConsumer.java:1.4
gzz/gzz/gfx/gl/FileSetTextureMemoryConsumer.java:1.5
--- gzz/gzz/gfx/gl/FileSetTextureMemoryConsumer.java:1.4 Thu Jan 16
01:06:33 2003
+++ gzz/gzz/gfx/gl/FileSetTextureMemoryConsumer.java Thu Jan 16 06:24:36 2003
@@ -51,7 +51,7 @@
// Only care about bytes.
int w = fullTexW, h = fullTexH;
int e = 0;
- int b = 0; // XXX variable b might not have been initialized
+ int b = -1;
while(w >= 1) {
b = getBytes(w, h);
if(b <= bytes) break;
Index: gzz/gzz/gfx/gl/GL.java
diff -u gzz/gzz/gfx/gl/GL.java:1.37 gzz/gzz/gfx/gl/GL.java:1.38
--- gzz/gzz/gfx/gl/GL.java:1.37 Wed Jan 15 09:14:45 2003
+++ gzz/gzz/gfx/gl/GL.java Thu Jan 16 06:24:36 2003
@@ -411,6 +411,21 @@
shaderName, params, false);
}
+ /** Call glGetCompressedTexImage.
+ */
+ public byte[] getCompressedTexImage(int lod) {
+ return impl_Texture_getCompressedTexImage(getId(), lod);
+ }
+
+ /** Call glCompressedTexImage.
+ * The length of data is used so it needs to be right.
+ */
+ public void compressedTexImage(int level, String internalFormat, int
width, int height,
+ int border, byte[] data) {
+ impl_Texture_compressedTexImage(getId(), level, internalFormat,
width, height,
+ border, data);
+ }
+
/** Call libtexture to create the image for each mipmap level
separately.
*/
public int shade_all_levels(int w, int h, int d, int comps,
@@ -460,6 +475,12 @@
level, internalFormat, x, y, w, h,
border);
}
+ public float[] getParameter(String name) {
+ return getGLTexParameterFloat("TEXTURE_2D", getId(), name);
+ }
+ public float[] getLevelParameter(int level, String name) {
+ return getGLTexLevelParameterFloat("TEXTURE_2D", getId(), level,
name);
+ }
}
@@ -487,6 +508,9 @@
String target, int level,
String internalFormat, int x, int y,
int w, int h, int border) ;
+ static private native byte[] impl_Texture_getCompressedTexImage(int id,
int lod);
+ static private native void impl_Texture_compressedTexImage(int id, int
level, String internalFormat,
+ int width, int height, int border, byte[] data);
//--------- OpenGL Program
/** An OpenGL program object.
@@ -692,6 +716,7 @@
String shaderName, String[] params) {
return impl_ByteVector_shade(getId(), w, h, d, comps, shaderName,
params);
}
+
}
/** Create a new bytevector of size 0.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gzz-commits] gzz ./TODO Documentation/VISION gfx/jni/GzzGL-j...,
Tuomas J. Lukka <=