[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz ./TODO gfx/demo/opengl/texform.py gfx/jni/G...
From: |
Tuomas J. Lukka |
Subject: |
[Gzz-commits] gzz ./TODO gfx/demo/opengl/texform.py gfx/jni/G... |
Date: |
Wed, 23 Oct 2002 10:55:40 -0400 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Tuomas J. Lukka <address@hidden> 02/10/23 10:55:40
Modified files:
. : TODO
gfx/demo/opengl: texform.py
gfx/jni : GzzGL-jni.cxx
gfx/libpaper : papermill.py
gzz/gfx/gl : GL.java
test/gzz/gfx/gl: paper.test
Added files:
gfx/libutil : texture.py
Log message:
Image now visible
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/TODO.diff?tr1=1.320&tr2=1.321&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/opengl/texform.py.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/jni/GzzGL-jni.cxx.diff?tr1=1.54&tr2=1.55&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libpaper/papermill.py.diff?tr1=1.55&tr2=1.56&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libutil/texture.py?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/gfx/gl/GL.java.diff?tr1=1.16&tr2=1.17&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/test/gzz/gfx/gl/paper.test.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
Patches:
Index: gzz/TODO
diff -u gzz/TODO:1.320 gzz/TODO:1.321
--- gzz/TODO:1.320 Wed Oct 23 10:23:59 2002
+++ gzz/TODO Wed Oct 23 10:55:39 2002
@@ -176,6 +176,9 @@
- clean GzzGL-jni
- javadoc TextVob specs
anybody:
+ - make callgl complain on broken stuff such as
+ the string "%(texid)s" in place of a number !!!!
+ ARGH ARGH ARGH
- test using pagespanview.ContentView as a CellContentView;
currently broken.
+ ZZ vanishingview cell size for pagespans and linebroken
Index: gzz/gfx/demo/opengl/texform.py
diff -u gzz/gfx/demo/opengl/texform.py:1.2 gzz/gfx/demo/opengl/texform.py:1.3
--- gzz/gfx/demo/opengl/texform.py:1.2 Mon Sep 23 05:09:29 2002
+++ gzz/gfx/demo/opengl/texform.py Wed Oct 23 10:55:39 2002
@@ -2,27 +2,12 @@
# We're using VERY large textures for the PDF stuff and it's
# vital that we understand what they get stored as.
+from gfx.libutil.texture import printTex
+
scroll = gzz.media.impl.PageImageScroll(None, gzz.mediaserver.Mediaserver.Id(
"0000000008000000E9573F43E00004CB42D4BEFEBAA27C20403F7D57693141B9E4D9A46329AC9C"))
rect = GLSpans.getRect(scroll.getCurrent())
-
-def printTex(id):
- for i in range(0,1):
- for p in (
- # "TEXTURE_WIDTH",
- # "TEXTURE_HEIGHT",
- "TEXTURE_RED_SIZE",
- "TEXTURE_GREEN_SIZE",
- "TEXTURE_BLUE_SIZE",
- "TEXTURE_ALPHA_SIZE",
- "TEXTURE_LUMINANCE_SIZE",
- "TEXTURE_INTENSITY_SIZE",
- ):
- print "p:\t",p,"\t", GL.getGLTexLevelParameterFloat("TEXTURE_2D",
id, i, p)
- print "if:\t",GL.getGLTokenString(
- int(GL.getGLTexLevelParameterFloat("TEXTURE_2D", id, i,
- "TEXTURE_INTERNAL_FORMAT")[0]))
print "PageImageScroll\n"
printTex(rect.texId)
Index: gzz/gfx/jni/GzzGL-jni.cxx
diff -u gzz/gfx/jni/GzzGL-jni.cxx:1.54 gzz/gfx/jni/GzzGL-jni.cxx:1.55
--- gzz/gfx/jni/GzzGL-jni.cxx:1.54 Wed Oct 23 09:45:37 2002
+++ gzz/gfx/jni/GzzGL-jni.cxx Wed Oct 23 10:55:39 2002
@@ -538,18 +538,22 @@
}
JNIEXPORT void JNICALL Java_gzz_gfx_gl_GL_impl_1Texture_1copyTexImage2D(
- JNIEnv *env, jclass, jint id, jstring bufferstr,
+ JNIEnv *env, jclass, jint id, jint wid, jstring bufferstr,
jstring targetstr, jint level,
jstring iforstring, jint x, jint y, jint w, jint h,
jint border) {
+ setWindow(wid);
GLenum buffer = tokenFromJstring(env, bufferstr);
GLenum target = tokenFromJstring(env, targetstr);
GLenum ifor = tokenFromJstring(env, iforstring);
glBindTexture(target, id);
glReadBuffer(buffer);
+ DBG(dbg) << "Copyteximage "<<target<<" "<<level<<" "<<ifor<<" "
+ <<x<<" "<<y<<" "<<w<<" "<<h<<" "<<border<<"\n";
glCopyTexImage2D(target, level, ifor, x, y, w, h, border);
glBindTexture(target, 0);
GLERR
+ releaseWindow();
}
JNIEXPORT jint JNICALL Java_gzz_gfx_gl_GL_impl_1Texture_1shade
Index: gzz/gfx/libpaper/papermill.py
diff -u gzz/gfx/libpaper/papermill.py:1.55 gzz/gfx/libpaper/papermill.py:1.56
--- gzz/gfx/libpaper/papermill.py:1.55 Wed Oct 23 09:45:37 2002
+++ gzz/gfx/libpaper/papermill.py Wed Oct 23 10:55:40 2002
@@ -146,42 +146,60 @@
s = 256
vs = w.createVobScene()
- vs.map.put(SolidBgVob(java.awt.Color.black))
+ vs.map.put(SolidBgVob(java.awt.Color.red))
cs1 = vs.coords.ortho(0, 0, 0, 0, s, s)
cs2 = vs.coords.affineCoordsys(
0, 0, 0, 0,
v[0][0], v[0][1], v[1][0], v[1][1]
)
- vs.map.put(GLRen.createPaperQuad(pap, 0, 0, 1, 1, 1))
+ vs.map.put(GLRen.createPaperQuad(pap, 0, 0, 1, 1, 1),
+ cs1, cs2)
w.renderStill(vs, 1)
tex = GL.createTexture()
- tex.copyTexImage2D("FRONT", "TEXTURE_2D", 0,
+ texid = tex.getTexId()
+ GL.call("""
+ BindTexture TEXTURE_2D %(texid)s
+ TexParameter TEXTURE_2D TEXTURE_MAX_ANISOTROPY_EXT 2
+ TexParameter TEXTURE_2D GENERATE_MIPMAP_SGIS TRUE
+ TexParameter TEXTURE_2D TEXTURE_MIN_FILTER LINEAR_MIPMAP_LINEAR
+ TexParameter TEXTURE_2D TEXTURE_MAG_FILTER LINEAR
+ BindTexture TEXTURE_2D 0
+ """ % locals())
+ print "READ: ", 0, vs.getSize().height-1-s, s, s
+ tex.copyTexImage2D(w.window, "FRONT", "TEXTURE_2D", 0,
"RGB", 0, vs.getSize().height-1-s,
s, s, 0)
-
+
npap = PaperHanger()
npap.setNPasses(1)
npap.cachedTexture = tex
ppass = npap.getPass(0)
- texid = tex.getTexId()
ppass.setSetupcode("""
- PushAttrib ENABLE_BIT TEXTURE_BIT DEPTH_BUFFER_BIT
+ PushAttrib ENABLE_BIT TEXTURE_BIT DEPTH_BUFFER_BIT
COLOR_BUFFER_BIT CURRENT_BIT
Disable BLEND
+ ActiveTexture TEXTURE1
+ Disable TEXTURE_2D
+ ActiveTexture TEXTURE0
Enable DEPTH_TEST
DepthFunc LESS
BindTexture TEXTURE_2D %(texid)s
TexEnv TEXTURE_ENV TEXTURE_ENV_MODE REPLACE
+ Color 0 1 0
+ Enable TEXTURE_2D
+ SecondaryColorEXT 0 0 0
""" % locals())
ppass.setNTexGens(1)
+ t = pap.repeat.vecs
+ print "T ",t
ppass.putNormalTexGen(0,
- [ v[0][0], v[0][1], 0, 0,
- v[1][0], v[1][1], 0, 0,
+ [ t[0][0], t[0][1], 0, 0,
+ t[1][0], t[1][1], 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,])
@@ -222,7 +240,7 @@
comb = TransparentCombinerPass()
code = """
- PushAttrib ENABLE_BIT TEXTURE_BIT DEPTH_BUFFER_BIT
+ PushAttrib ENABLE_BIT TEXTURE_BIT DEPTH_BUFFER_BIT
COLOR_BUFFER_BIT CURRENT_BIT
Disable BLEND
"""
Index: gzz/gzz/gfx/gl/GL.java
diff -u gzz/gzz/gfx/gl/GL.java:1.16 gzz/gzz/gfx/gl/GL.java:1.17
--- gzz/gzz/gfx/gl/GL.java:1.16 Wed Oct 23 09:45:37 2002
+++ gzz/gzz/gfx/gl/GL.java Wed Oct 23 10:55:40 2002
@@ -462,11 +462,12 @@
/** Read into this texture from screen.
*/
- public void copyTexImage2D(String buffer,
+ public void copyTexImage2D(Window win, String buffer,
String target, int level,
String internalFormat, int x, int y,
int w, int h, int border) {
- impl_Texture_copyTexImage2D(getId(), buffer, target,
+ impl_Texture_copyTexImage2D(getId(), win.getId(),
+ buffer, target,
level, internalFormat, x, y, w, h,
border);
}
@@ -493,7 +494,7 @@
static private native void impl_Texture_downsampleInto(int id, int intoid,
String target,
int level, String internalFormat, String transferformat);
static private native void impl_Texture_copyTexImage2D(
- int id, String buffer,
+ int id, int wid, String buffer,
String target, int level,
String internalFormat, int x, int y,
int w, int h, int border) ;
Index: gzz/test/gzz/gfx/gl/paper.test
diff -u gzz/test/gzz/gfx/gl/paper.test:1.5 gzz/test/gzz/gfx/gl/paper.test:1.6
--- gzz/test/gzz/gfx/gl/paper.test:1.5 Wed Oct 23 09:45:37 2002
+++ gzz/test/gzz/gfx/gl/paper.test Wed Oct 23 10:55:40 2002
@@ -2,6 +2,7 @@
from gzz.vob import *
from java.awt import Color
+import java
from gzz.gfx.gl import GL, GLRen, GLCache, PaperMill
from test.tools.gfx import *
@@ -35,6 +36,8 @@
p1 = PaperMill.getInstance().getPaper(i)
p2 = PaperMill.getInstance().getOptimizedPaper(i, win)
+ java.lang.Thread.sleep(3000)
+
pq1 = GLRen.createPaperQuad(p1, 0, 0, 1, 1, 1)
pq2 = GLRen.createPaperQuad(p2, 0, 0, 1, 1, 1)
@@ -45,8 +48,10 @@
vs.put(pq2, 0, 150, 0, 150, 300)
render(vs)
+ java.lang.Thread.sleep(4000)
- for x, y, w, h in [
+ if 0:
+ for x, y, w, h in [
(10, 10, 5, 5),
(50, 20, 10, 5),
(100, 200, 10, 30),
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gzz-commits] gzz ./TODO gfx/demo/opengl/texform.py gfx/jni/G...,
Tuomas J. Lukka <=