diff options
author | Reinhard Tartler <siretart@tauware.de> | 2011-10-10 17:46:25 +0200 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2011-10-10 17:46:25 +0200 |
commit | 844a4094f098684dd1da5bc11e73479fb61373a3 (patch) | |
tree | 5441f02930e1658777a262f3d3647d64f99cde22 /nx-X11/programs/Xserver/GL/mesa/X/xf86glx.c | |
parent | f4092abdf94af6a99aff944d6264bc1284e8bdd4 (diff) | |
download | nx-libs-844a4094f098684dd1da5bc11e73479fb61373a3.tar.gz nx-libs-844a4094f098684dd1da5bc11e73479fb61373a3.tar.bz2 nx-libs-844a4094f098684dd1da5bc11e73479fb61373a3.zip |
Imported nx-X11-3.1.0-3.tar.gznx-X11/3.1.0-3
Summary: Imported nx-X11-3.1.0-3.tar.gz
Keywords:
Imported nx-X11-3.1.0-3.tar.gz
into Git repository
Diffstat (limited to 'nx-X11/programs/Xserver/GL/mesa/X/xf86glx.c')
-rw-r--r-- | nx-X11/programs/Xserver/GL/mesa/X/xf86glx.c | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/nx-X11/programs/Xserver/GL/mesa/X/xf86glx.c b/nx-X11/programs/Xserver/GL/mesa/X/xf86glx.c index 5dd4e7c37..19b5be637 100644 --- a/nx-X11/programs/Xserver/GL/mesa/X/xf86glx.c +++ b/nx-X11/programs/Xserver/GL/mesa/X/xf86glx.c @@ -71,6 +71,10 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "glcontextmodes.h" +#ifdef NXAGENT_SERVER +#include "../main/WSDrawBuffer.h" +#endif + /* * This structure is statically allocated in the __glXScreens[] * structure. This struct is not used anywhere other than in @@ -95,6 +99,36 @@ static __GLXscreenInfo __glDDXScreenInfo = { NULL /* WrappedPositionWindow is overwritten */ }; +#ifdef NXAGENT_SERVER +WSDrawBufferPtr pWSDrawBuffer = NULL; + +void AddWSDrawBuffer(GLframebuffer *mesa_buffer) +{ + WSDrawBufferPtr prevWSDB; + WSDrawBufferPtr newWSDB; + WSDrawBufferPtr p; + + prevWSDB = NULL; + newWSDB = NULL; + p = pWSDrawBuffer; + while (p != NULL) { + prevWSDB = p; + if (prevWSDB -> DrawBuffer == mesa_buffer) { + return; + } + p = p -> next; + } + newWSDB = malloc(sizeof(WSDrawBufferRec)); + newWSDB -> DrawBuffer = mesa_buffer; + newWSDB -> next = NULL; + + if (pWSDrawBuffer == NULL) + pWSDrawBuffer = newWSDB; + else + prevWSDB -> next = newWSDB; +} +#endif + void *__glXglDDXScreenInfo(void) { return &__glDDXScreenInfo; } @@ -748,6 +782,10 @@ void __MESA_destroyBuffer(__GLdrawablePrivate *glPriv) __MESA_buffer buf = (__MESA_buffer)glPriv->private; __GLXdrawablePrivate *glxPriv = (__GLXdrawablePrivate *)glPriv->other; +#ifdef NXAGENT_SERVER + AddWSDrawBuffer(& (buf -> xm_buf -> mesa_buffer) ); +#endif + /* Destroy Mesa's buffers */ if (buf->xm_buf) XMesaDestroyBuffer(buf->xm_buf); @@ -757,7 +795,7 @@ void __MESA_destroyBuffer(__GLdrawablePrivate *glPriv) glPriv->frontBuffer.resize = buf->fbresize; __glXFree(glPriv->private); - glPriv->private = NULL; + glPriv->private = NULL; } __GLinterface *__MESA_createContext(__GLimports *imports, |