[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz ./NEWS gfx/jni/GzzGL-jni.cxx
From: |
Tuomas J. Lukka |
Subject: |
[Gzz-commits] gzz ./NEWS gfx/jni/GzzGL-jni.cxx |
Date: |
Wed, 04 Sep 2002 04:02:14 -0400 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Tuomas J. Lukka <address@hidden> 02/09/04 04:02:13
Modified files:
. : NEWS
gfx/jni : GzzGL-jni.cxx
Log message:
Finally, fix GLX contexts. Now things finally work the first time
without mysterious dark blue textures etc
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/NEWS.diff?tr1=1.24&tr2=1.25&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/jni/GzzGL-jni.cxx.diff?tr1=1.11&tr2=1.12&r1=text&r2=text
Patches:
Index: gzz/NEWS
diff -c gzz/NEWS:1.24 gzz/NEWS:1.25
*** gzz/NEWS:1.24 Wed Aug 28 09:07:28 2002
--- gzz/NEWS Wed Sep 4 04:02:13 2002
***************
*** 2,10 ****
User-visible changes in Gzz
============================
The 0.8 Series
=========
! A *TOTAL* rewrite.
- storm (mediaserver)
- OpenGL interface
--- 2,12 ----
User-visible changes in Gzz
============================
+
+
The 0.8 Series
=========
! A *TOTAL* rewrite. Everything is new.
- storm (mediaserver)
- OpenGL interface
Index: gzz/gfx/jni/GzzGL-jni.cxx
diff -c gzz/gfx/jni/GzzGL-jni.cxx:1.11 gzz/gfx/jni/GzzGL-jni.cxx:1.12
*** gzz/gfx/jni/GzzGL-jni.cxx:1.11 Wed Sep 4 03:37:10 2002
--- gzz/gfx/jni/GzzGL-jni.cxx Wed Sep 4 04:02:13 2002
***************
*** 64,86 ****
JNIEnv *jnienv_eventloop;
void setWindow(int wid = -1) {
! Os::Window *win = (wid<0 ? defaultWindow :
! windows.get(wid));
! if(!win->setCurrent()) {
cerr << "Couldn't set window to current -> returning\n";
return;
! }
! DBG(dbg) << "Set current "<<wid<<"\n";
}
! void releaseWindow(int wid = -1) {
! Os::Window *win = (wid<0 ? defaultWindow :
! windows.get(wid));
if(!win->releaseCurrent()) {
cerr << "Couldn't release window current!!!";
exit(17);
}
DBG(dbg) << "Release current "<<wid<<"\n";
}
--- 64,100 ----
JNIEnv *jnienv_eventloop;
+ vector<int> contextStack;
+
+ Os::Window *getWindowByWID(int wid) {
+ return (wid<0 ? defaultWindow : windows.get(wid));
+ }
+
void setWindow(int wid = -1) {
! Os::Window *win = getWindowByWID(wid);
! if(!win->setCurrent()) {
cerr << "Couldn't set window to current -> returning\n";
return;
! }
! contextStack.push_back(wid);
! DBG(dbg) << "Set current "<<wid<<"\n";
}
! void releaseWindow() {
! if(contextStack.size() == 0) {
! cerr << "TRYING TO RELEASE CONTEXT WHEN STACK EMPTY!!! PLEASE REPORT
BUG!";
! return;
! }
! int wid = contextStack[contextStack.size()-1];
! contextStack.pop_back();
! Os::Window *win = getWindowByWID(wid);
if(!win->releaseCurrent()) {
cerr << "Couldn't release window current!!!";
exit(17);
}
+ if(contextStack.size() != 0) {
+ getWindowByWID(contextStack[contextStack.size()-1])->setCurrent();
+ }
DBG(dbg) << "Release current "<<wid<<"\n";
}
***************
*** 553,559 ****
glEndList();
GLERR
! releaseWindow(wid);
}
JNIEXPORT void JNICALL Java_gzz_gfx_gl_GZZGL_compileCallGL
--- 567,573 ----
glEndList();
GLERR
! releaseWindow();
}
JNIEXPORT void JNICALL Java_gzz_gfx_gl_GZZGL_compileCallGL
***************
*** 680,686 ****
GLERR
if(standardcoords) {
! releaseWindow(window);
}
--- 694,700 ----
GLERR
if(standardcoords) {
! releaseWindow();
}
***************
*** 746,752 ****
GLERR
if(standardcoords) {
! releaseWindow(window);
}
--- 760,766 ----
GLERR
if(standardcoords) {
! releaseWindow();
}
- [Gzz-commits] gzz ./NEWS gfx/jni/GzzGL-jni.cxx,
Tuomas J. Lukka <=