stub.c revision 18e44ea7c4a3dffc9f5d5052dfe6873ada58de57
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync/* Copyright (c) 2001, Stanford University
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * All rights reserved
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * See the file LICENSE.txt for information on redistributing this software.
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync stub.spu->dispatch_table.GetIntegerv(GL_DRAW_BUFFER, &buffer);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync if ((NIL_RTTHREAD!=stub.hSyncThread) && (RTThreadNativeSelf()==RTThreadGetNative(stub.hSyncThread)))
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync crDebug("going to XOpenDisplay(%s)", pWindow->dpyName);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync crWarning("Failed to open display %s", pWindow->dpyName);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * Returns -1 on error
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncGLint APIENTRY crCreateContext( const char *dpyName, GLint visBits )
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync /* XXX in Chromium 1.5 and earlier, the last parameter was UNDECIDED.
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * That didn't seem right so it was changed to CHROMIUM. (Brian)
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync context = stubNewContext(dpyName, visBits, CHROMIUM, 0);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncvoid APIENTRY crMakeCurrent( GLint window, GLint context )
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync crHashtableSearch(stub.windowTable, (unsigned int) window);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync crWarning("Can't call crMakeCurrent with native GL context");
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncvoid APIENTRY crSwapBuffers( GLint window, GLint flags )
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync crHashtableSearch(stub.windowTable, (unsigned int) window);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * Returns -1 on error
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncGLint APIENTRY crWindowCreate( const char *dpyName, GLint visBits )
#ifdef WINDOWS
# ifdef CR_NEWWINTRACK
void APIENTRY stub_GetChromiumParametervCR( GLenum target, GLuint index, GLenum type, GLsizei count, GLvoid *values )
char **ret;
switch( target )
case GL_HEAD_SPU_NAME_CR:
return res;
#ifdef WINDOWS
int iret;
return GL_FALSE;
pt.x = 0;
pt.y = 0;
crDebug("Rgn[%d] = (%d, %d, %d, %d)", i, pRects[i].left, pRects[i].top, pRects[i].right, pRects[i].bottom);
if (lpRgnData)
crDebug("Dispatched WindowVisibleRegion (%i, cRects=%i)", pWindow->spuWindow, lpRgnData->rdh.nCount);
stub.spuDispatch.WindowVisibleRegion(pWindow->spuWindow, lpRgnData->rdh.nCount, (GLint*) lpRgnData->Buffer);
return GL_TRUE;
return GL_FALSE;
# ifndef CR_NEWWINTRACK
(void) key;
case WM_MOVING:
case WM_SIZING:
case WM_MOVE:
case WM_CREATE:
case WM_SIZE:
case WM_SHOWWINDOW:
case WM_ACTIVATEAPP:
case WM_PAINT:
case WM_NCPAINT:
case WM_NCACTIVATE:
case WM_ERASEBKGND:
case WM_MOVING:
case WM_SIZING:
case WM_MOVE:
case WM_ACTIVATEAPP:
case WM_NCPAINT:
case WM_NCACTIVATE:
case WM_ERASEBKGND:
case WM_CREATE:
case WM_SIZE:
case WM_SHOWWINDOW:
void stubInstallWindowMessageHook()
stub.hMessageHook = SetWindowsHookEx(WH_CALLWNDPROCRET, stubCBWindowMessageHookProc, 0, crThreadID());
vma=0;
vmi=0;
int cRects, i;
bool bNoUpdate = false;
return GL_FALSE;
* it seems there's no way to get even based updates for this. Or I've failed to find the appropriate extension.
#ifdef VBOX_TEST_MEGOO
bNoUpdate = true;
if (!bNoUpdate
|| (pWindow->pVisibleRegions && crMemcmp(pWindow->pVisibleRegions, pXRects, cRects * sizeof(XRectangle)))))
if (!pGLRects)
return GL_FALSE;
for (i=0; i<cRects; ++i)
//crDebug("Rect[%i]=(%i,%i,%i,%i)", i, pGLRects[4*i+0], pGLRects[4*i+1], pGLRects[4*i+2], pGLRects[4*i+3]);
return GL_TRUE;
return GL_FALSE;