[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz ./TODO gfx/libos/Os-GLX.cxx gfx/libos/Os.hxx
From: |
Tuomas J. Lukka |
Subject: |
[Gzz-commits] gzz ./TODO gfx/libos/Os-GLX.cxx gfx/libos/Os.hxx |
Date: |
Thu, 05 Dec 2002 03:32:57 -0500 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Tuomas J. Lukka <address@hidden> 02/12/05 03:32:57
Modified files:
. : TODO
gfx/libos : Os-GLX.cxx Os.hxx
Log message:
One step further - code is there, not connected to Java yet
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/TODO.diff?tr1=1.438&tr2=1.439&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libos/Os-GLX.cxx.diff?tr1=1.14&tr2=1.15&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libos/Os.hxx.diff?tr1=1.14&tr2=1.15&r1=text&r2=text
Patches:
Index: gzz/TODO
diff -u gzz/TODO:1.438 gzz/TODO:1.439
--- gzz/TODO:1.438 Wed Dec 4 10:50:40 2002
+++ gzz/TODO Thu Dec 5 03:32:57 2002
@@ -61,6 +61,7 @@
tjl:
- return ANKOS to Agora [ blocked by: waiting for trip to agora ]
- off-screen rendering
+ - needed for animations and render-to-texture
- go through most important GL demos and redo the interfaces
- fillet demo
- fix last two screens
Index: gzz/gfx/libos/Os-GLX.cxx
diff -u gzz/gfx/libos/Os-GLX.cxx:1.14 gzz/gfx/libos/Os-GLX.cxx:1.15
--- gzz/gfx/libos/Os-GLX.cxx:1.14 Thu Dec 5 03:08:11 2002
+++ gzz/gfx/libos/Os-GLX.cxx Thu Dec 5 03:32:57 2002
@@ -204,16 +204,15 @@
pbufferAttributes, &nel);
if(!pbFbConfig) BARF("Can't get dblbuf visual");
- pbContext = glXCreateNewContext(dpy, pbFbConfig[0], GLX_RGBA_TYPE,
- 0, GL_TRUE);
+ pbContext = glXCreateNewContext(dpy, pbFbConfig[0],
+ GLX_RGBA_TYPE,
+ dbContext, GL_TRUE);
}
Os::Window *openWindow(int x, int y, int w, int h);
- Os::RenderingSurface *openStableOffScreen(int w, int h) {
- return 0;
- }
+ Os::RenderingSurface *openStableOffScreen(int w, int h);
Image *loadImageFile(const char *filename) {
ImageRaster r = loadImage(filename);
@@ -246,6 +245,7 @@
LXWindowSystem *ws;
GLXPbuffer pbuf;
+ int w, h;
LXPBuffer(LXWindowSystem *ws, int w, int h) : ws(ws) {
int attrs[] = {
@@ -256,6 +256,29 @@
0
};
pbuf = glXCreatePbuffer(ws->dpy, ws->pbFbConfig[0], attrs);
+
+ unsigned val;
+ glXQueryDrawable(ws->dpy, pbuf, GLX_PBUFFER_WIDTH, &val);
+ w = val;
+
+ glXQueryDrawable(ws->dpy, pbuf, GLX_PBUFFER_HEIGHT, &val);
+ h = val;
+ }
+
+ bool setCurrent() {
+ bool ret = glXMakeContextCurrent(ws->dpy, pbuf, pbuf,
ws->pbContext);
+ return ret;
+ }
+ bool releaseCurrent() {
+ bool ret = glXMakeContextCurrent(ws->dpy, None, None, NULL);
+ return ret;
+ }
+
+ void getSize(int *xywh) {
+ xywh[0] = 0;
+ xywh[1] = 0;
+ xywh[2] = w;
+ xywh[3] = h;
}
};
@@ -476,6 +499,11 @@
windowsByX[win->xw] = win;
win->mapThisWindow();
return win;
+ }
+
+ Os::RenderingSurface *LXWindowSystem::openStableOffScreen(int w, int h)
+ {
+ return new LXPBuffer(this, w, h);
}
WindowSystem *WindowSystem::instance = 0;
Index: gzz/gfx/libos/Os.hxx
diff -u gzz/gfx/libos/Os.hxx:1.14 gzz/gfx/libos/Os.hxx:1.15
--- gzz/gfx/libos/Os.hxx:1.14 Thu Dec 5 03:08:11 2002
+++ gzz/gfx/libos/Os.hxx Thu Dec 5 03:32:57 2002
@@ -87,7 +87,7 @@
/** Swap buffers; may be no-op.
*/
- virtual void swapBuffers() = 0;
+ virtual void swapBuffers() { };
};
/** An OpenGL rendering surface in a physical
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gzz-commits] gzz ./TODO gfx/libos/Os-GLX.cxx gfx/libos/Os.hxx,
Tuomas J. Lukka <=