Changeset 78375 in vbox for trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_context.cpp
- Timestamp:
- May 3, 2019 9:51:02 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_context.cpp
r78263 r78375 63 63 return -1; 64 64 } 65 cr_server.MainContextInfo.pContext = crStateCreateContext(&cr_server. limits, visualBits, NULL);65 cr_server.MainContextInfo.pContext = crStateCreateContext(&cr_server.StateTracker, &cr_server.limits, visualBits, NULL); 66 66 CRASSERT(cr_server.MainContextInfo.pContext); 67 67 cr_server.firstCallCreateContext = GL_FALSE; … … 114 114 if (pContextInfo->SpuContext < 0) { 115 115 crWarning("crServerDispatchCreateContext() failed."); 116 crStateEnableDiffOnMakeCurrent( GL_TRUE);116 crStateEnableDiffOnMakeCurrent(&cr_server.StateTracker, GL_TRUE); 117 117 cr_server.bUseMultipleContexts = GL_FALSE; 118 118 if (!fFirst) … … 121 121 else if (fFirst) 122 122 { 123 crStateEnableDiffOnMakeCurrent( GL_FALSE);123 crStateEnableDiffOnMakeCurrent(&cr_server.StateTracker, GL_FALSE); 124 124 } 125 125 } … … 132 132 * dispatch function pointers. 133 133 */ 134 newCtx = crStateCreateContextEx(&cr_server. limits, visualBits, NULL, internalID);134 newCtx = crStateCreateContextEx(&cr_server.StateTracker, &cr_server.limits, visualBits, NULL, internalID); 135 135 if (newCtx) { 136 crStateSetCurrentPointers( 136 crStateSetCurrentPointers(newCtx, &(cr_server.current) ); 137 137 crStateResetCurrentPointers(&(cr_server.current)); 138 138 retVal = preloadCtxID<0 ? (GLint)crHashtableAllocKeys( cr_server.contextTable, 1 ) : preloadCtxID; … … 214 214 crCtxInfo->currentMural = NULL; 215 215 crHashtableDelete(cr_server.contextTable, ctx, NULL); 216 crStateDestroyContext( crCtx);216 crStateDestroyContext(&cr_server.StateTracker, crCtx); 217 217 218 218 if (crCtxInfo->CreateInfo.pszDpyName) … … 306 306 * crStateSwitchPrepare restores the FBO state to its default values before the context window switch, 307 307 * while crStateSwitchPostprocess restores it back to the original values */ 308 oldCtx = crStateGetCurrent( );308 oldCtx = crStateGetCurrent(&cr_server.StateTracker); 309 309 if (oldMural && oldMural->fRedirected && crServerSupportRedirMuralFBO()) 310 310 { … … 335 335 336 336 /* This is a hack to force updating the 'current' attribs */ 337 crStateUpdateColorBits( );337 crStateUpdateColorBits(&cr_server.StateTracker); 338 338 339 339 if (ctx) 340 crStateSetCurrentPointers( 340 crStateSetCurrentPointers(ctx, &(cr_server.current) ); 341 341 342 342 /* check if being made current for first time, update viewport */ … … 387 387 388 388 /* This used to be earlier, after crStateUpdateColorBits() call */ 389 crStateMakeCurrent( ctx );389 crStateMakeCurrent(&cr_server.StateTracker, ctx ); 390 390 391 391 if (mural && mural->fRedirected && crServerSupportRedirMuralFBO())
Note:
See TracChangeset
for help on using the changeset viewer.