Index: /trunk/src/VBox/Additions/common/crOpenGL/load.c
===================================================================
--- /trunk/src/VBox/Additions/common/crOpenGL/load.c	(revision 20028)
+++ /trunk/src/VBox/Additions/common/crOpenGL/load.c	(revision 20029)
@@ -74,9 +74,8 @@
 static SwapBuffersFunc_t origSwapBuffers;
 static DrawBufferFunc_t origDrawBuffer;
+static ScissorFunc_t origScissor;
 
 static void stubCheckWindowState(void)
 {
-    int winX, winY;
-    unsigned int winW, winH;
     WindowInfo *window;
     bool bForceUpdate = false;
@@ -88,6 +87,4 @@
 
     window = stub.currentContext->currentDrawable;
-
-    stubGetWindowGeometry( window, &winX, &winY, &winW, &winH );
 
 #ifdef WINDOWS
@@ -148,6 +145,17 @@
 {
     stubCheckWindowState();
-    /* call the original SPU glViewport function */
+    /* call the original SPU glViewport function */  
     origViewport(x, y, w, h);
+
+    /*
+    {
+        int winX, winY;
+        unsigned int winW, winH;
+        WindowInfo *pWindow;
+        pWindow = stub.currentContext->currentDrawable;
+        stubGetWindowGeometry(pWindow, &winX, &winY, &winW, &winH);
+        origViewport(0, 0, winW, winH);
+    }
+    */
 }
 
@@ -162,4 +170,20 @@
     stubCheckWindowState();
     origDrawBuffer(buf);
+}
+
+static void SPU_APIENTRY trapScissor(GLint x, GLint y, GLsizei w, GLsizei h)
+{
+    origScissor(x, y, w, h);
+
+    /*
+    {
+        int winX, winY;
+        unsigned int winW, winH;
+        WindowInfo *pWindow;
+        pWindow = stub.currentContext->currentDrawable;
+        stubGetWindowGeometry(pWindow, &winX, &winY, &winW, &winH);
+        origScissor(0, 0, winW, winH);
+    }
+    */
 }
 
@@ -179,6 +203,8 @@
         origSwapBuffers = stub.spuDispatch.SwapBuffers;
         origDrawBuffer = stub.spuDispatch.DrawBuffer;
+        origScissor = stub.spuDispatch.Scissor;
         stub.spuDispatch.Clear = trapClear;
         stub.spuDispatch.Viewport = trapViewport;
+        /*stub.spuDispatch.Scissor = trapScissor;*/
         /*stub.spuDispatch.SwapBuffers = trapSwapBuffers;
         stub.spuDispatch.DrawBuffer = trapDrawBuffer;*/
