Changeset 63204 in vbox for trunk/src/VBox/Additions/common
- Timestamp:
- Aug 9, 2016 1:36:53 PM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 109830
- Location:
- trunk/src/VBox/Additions/common/crOpenGL
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/crOpenGL/context.c
r62060 r63204 135 135 { 136 136 ContextInfo *context = (ContextInfo *) data1; 137 RT_NOREF(key); 137 138 138 139 CRASSERT(context); … … 252 253 253 254 #ifdef GLX 255 # if 0 /* unused */ 254 256 static XErrorHandler oldErrorHandler; 255 257 static unsigned char lastXError = Success; … … 258 260 errorHandler (Display *dpy, XErrorEvent *e) 259 261 { 262 RT_NOREF(dpy); 263 260 264 lastXError = e->error_code; 261 265 return 0; 262 266 } 267 # endif /* unused */ 263 268 #endif 264 269 … … 1095 1100 ContextInfo *pCtx = (ContextInfo *) data2; 1096 1101 1102 RT_NOREF(key); 1103 1104 1097 1105 if (pWindow->pOwner == pCtx) 1098 1106 { -
trunk/src/VBox/Additions/common/crOpenGL/glx.c
r62521 r63204 74 74 }; 75 75 76 #ifndef VBOX_NO_NATIVEGL /* Old code */ 76 77 static struct VisualInfo *VisualInfoList = NULL; 78 #endif 77 79 78 80 static void stubXshmUpdateImageRect(Display *dpy, GLXDrawable draw, GLX_Pixmap_t *pGlxPixmap, XRectangle *pRect); 79 81 static void stubQueryXDamageExtension(Display *dpy, ContextInfo *pContext); 82 83 #ifndef VBOX_NO_NATIVEGL /* Old code */ 80 84 81 85 static void … … 154 158 {GLX_SAMPLE_BUFFERS_SGIS, "GLX_SAMPLE_BUFFERS_SGIS", TEST_GREATER_0, CR_MULTISAMPLE_BIT}, 155 159 }; 156 #ifndef VBOX_NO_NATIVEGL /* Currently not used */ 160 157 161 static int QueryVisBits(Display *dpy, XVisualInfo *vis) 158 162 { … … 210 214 return visBits; 211 215 } 212 #endif /* not 0 */ 216 217 #endif /* !VBOX_NO_NATIVEGL */ 213 218 214 219 … … 564 569 ContextInfo *context; 565 570 int visBits = CR_RGB_BIT | CR_DOUBLE_BIT | CR_DEPTH_BIT; /* default vis */ 566 int i, numExt;567 571 568 572 stubInit(); … … 572 576 /* 573 577 { 578 int i, numExt; 574 579 char **list; 575 580 … … 667 672 stubFindPixmapParms_t *pParms = (stubFindPixmapParms_t *) data2; 668 673 GLX_Pixmap_t *pGlxPixmap = (GLX_Pixmap_t *) crHashtableSearch(pCtx->pGLXPixmapsHash, (unsigned int) pParms->draw); 674 (void)key; 669 675 670 676 if (pGlxPixmap) … … 930 936 DECLEXPORT(int) VBOXGLXTAG(glXGetConfig)( Display *dpy, XVisualInfo *vis, int attrib, int *value ) 931 937 { 938 (void)dpy; 939 932 940 if (!vis) { 933 941 /* SGI OpenGL Performer hits this */ … … 1106 1114 } 1107 1115 1116 #ifdef VBOX_TEST_MEGOO 1108 1117 static XErrorHandler oldErrorHandler; 1109 1118 static unsigned char lastXError = Success; … … 1112 1121 errorHandler (Display *dpy, XErrorEvent *e) 1113 1122 { 1123 (void)dpy; 1114 1124 lastXError = e->error_code; 1115 1125 return 0; 1116 1126 } 1127 #endif /* VBOX_TEST_MGEOO */ 1117 1128 1118 1129 DECLEXPORT(void) VBOXGLXTAG(glXSwapBuffers)( Display *dpy, GLXDrawable drawable ) … … 1947 1958 { 1948 1959 GLXFBConfig *pGLXFBConfigs = NULL; 1949 struct VisualInfo *v;1950 int i=0 , cVisuals;1960 /*struct VisualInfo *v; */ 1961 int i=0; 1951 1962 XVisualInfo searchvis, *pVisuals; 1952 1963 … … 2025 2036 (void) config; 2026 2037 2038 /* 2027 2039 struct VisualInfo *v; 2028 2040 2029 /*2030 2041 for (v = VisualInfoList; v; v = v->next) { 2031 2042 if (v->dpy == dpy && v->visualid == (VisualID)config) … … 2418 2429 pGlxPixmap->x, pGlxPixmap->y, pGlxPixmap->w, pGlxPixmap->h, rect.height);*/ 2419 2430 2420 for (; (rect.y+rect.height)<=(pGlxPixmap->y+ pGlxPixmap->h); rect.y+=rect.height)2431 for (; (rect.y+rect.height)<=(pGlxPixmap->y+(int)pGlxPixmap->h); rect.y+=rect.height) 2421 2432 { 2422 2433 stubXshmUpdateImageRect(dpy, draw, pGlxPixmap, &rect); 2423 2434 } 2424 2435 2425 if (rect.y!=(pGlxPixmap->y+ pGlxPixmap->h))2436 if (rect.y!=(pGlxPixmap->y+(int)pGlxPixmap->h)) 2426 2437 { 2427 2438 rect.height=pGlxPixmap->h-rect.y; … … 2528 2539 DECLEXPORT(void) VBOXGLXTAG(glXBindTexImageEXT)(Display *dpy, GLXDrawable draw, int buffer, const int *attrib_list) 2529 2540 { 2530 static int cnt=0;2531 XImage dummyimg;2532 2541 ContextInfo *context = stubGetCurrentContext(); 2533 2534 2542 GLX_Pixmap_t *pGlxPixmap; 2543 RT_NOREF(buffer, attrib_list); 2535 2544 2536 2545 if (!context) -
trunk/src/VBox/Additions/common/crOpenGL/load.c
r62847 r63204 70 70 71 71 72 #ifndef VBOX_NO_NATIVEGL 72 73 static void stubInitNativeDispatch( void ) 73 74 { 74 # define MAX_FUNCS 100075 # define MAX_FUNCS 1000 75 76 SPUNamedFunctionTable gl_funcs[MAX_FUNCS]; 76 77 int numFuncs; … … 88 89 crSPUInitDispatch( &stub.nativeDispatch, gl_funcs ); 89 90 crSPUInitDispatchNops( &stub.nativeDispatch ); 90 #undef MAX_FUNCS 91 } 91 # undef MAX_FUNCS 92 } 93 #endif /* !VBOX_NO_NATIVEGL */ 92 94 93 95 … … 178 180 WindowInfo *pWindow = (WindowInfo *) data1; 179 181 ContextInfo *pCtx = (ContextInfo *) data2; 182 (void)key; 180 183 181 184 if (pWindow == pCtx->currentDrawable … … 252 255 } 253 256 254 static void SPU_APIENTRY trapSwapBuffers(GLint window, GLint flags)257 /*static void SPU_APIENTRY trapSwapBuffers(GLint window, GLint flags) 255 258 { 256 259 stubCheckWindowsState(); … … 262 265 stubCheckWindowsState(); 263 266 origDrawBuffer(buf); 264 } 265 267 }*/ 268 269 #if 0 /* unused */ 266 270 static void SPU_APIENTRY trapScissor(GLint x, GLint y, GLsizei w, GLsizei h) 267 271 { … … 270 274 WindowInfo *pWindow; 271 275 ContextInfo *context = stubGetCurrentContext(); 276 (void)x; (void)y; (void)w; (void)h; 277 272 278 pWindow = context->currentDrawable; 273 279 stubGetWindowGeometry(pWindow, &winX, &winY, &winW, &winH); 274 280 origScissor(0, 0, winW, winH); 275 281 } 282 #endif /* unused */ 276 283 277 284 /** … … 301 308 } 302 309 310 #if 0 /** @todo stubSPUTearDown & stubSPUTearDownLocked are not referenced */ 311 303 312 // Callback function, used to destroy all created contexts 304 313 static void hsWalkStubDestroyContexts(unsigned long key, void *data1, void *data2) 305 314 { 315 (void)data1; (void)data2; 306 316 stubDestroyContext(key); 307 317 } … … 378 388 STUB_INIT_UNLOCK(); 379 389 } 390 391 #endif /** @todo stubSPUTearDown & stubSPUTearDownLocked are not referenced */ 380 392 381 393 static void stubSPUSafeTearDown(void) … … 498 510 static void stubSignalHandler(int signo) 499 511 { 512 (void)signo; 500 513 stubSPUSafeTearDown(); 501 514 exit(0); /* this causes stubExitHandler() to be called */ … … 721 734 #endif /* 0 */ 722 735 723 void stubSetDefaultConfigurationOptions(void)736 static void stubSetDefaultConfigurationOptions(void) 724 737 { 725 738 unsigned char key[16]= {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; … … 755 768 #ifdef CR_NEWWINTRACK 756 769 # ifdef VBOX_WITH_WDDM 757 static stubDispatchVisibleRegions(WindowInfo *pWindow)770 static void stubDispatchVisibleRegions(WindowInfo *pWindow) 758 771 { 759 772 DWORD dwCount; … … 798 811 { 799 812 WindowInfo *pWindow = (WindowInfo *) data1; 800 (void) data2;813 (void)key; (void) data2; 801 814 802 815 if (pWindow->type!=CHROMIUM || pWindow->spuWindow==0) … … 942 955 */ 943 956 944 CRConnection *conn = NULL;945 957 char response[1024]; 946 958 char **spuchain; -
trunk/src/VBox/Additions/common/crOpenGL/stub.c
r59505 r63204 156 156 void APIENTRY crVBoxTexPresent(GLuint texture, GLuint cfg, GLint xPos, GLint yPos, GLint cRects, const GLint *pRects) 157 157 { 158 RT_NOREF(texture, cfg, xPos, yPos, cRects, pRects); 158 159 crError("not expected!"); 159 160 } -
trunk/src/VBox/Additions/common/crOpenGL/stub.h
r55621 r63204 284 284 extern CRtsd g_stubCurrentContextTSD; 285 285 286 DECLINLINE(ContextInfo*) stubGetCurrentContext( )286 DECLINLINE(ContextInfo*) stubGetCurrentContext(void) 287 287 { 288 288 ContextInfo* ctx;
Note:
See TracChangeset
for help on using the changeset viewer.