VirtualBox

Ignore:
Timestamp:
Mar 28, 2012 3:48:51 PM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
77147
Message:

crOpenGL: basics for using multiple contexts on host

Location:
trunk/src/VBox/GuestHost/OpenGL/include
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/OpenGL/include/cr_glstate.h

    r40431 r40691  
    207207DECLEXPORT(CRContext *) crStateGetCurrent(void);
    208208DECLEXPORT(void) crStateDestroyContext(CRContext *ctx);
     209DECLEXPORT(GLboolean) crStateEnableDiffOnMakeCurrent(GLboolean fEnable);
    209210
    210211CRContext * crStateSwichPrepare(CRContext *toCtx);
     
    227228#ifndef IN_GUEST
    228229DECLEXPORT(int32_t) crStateSaveContext(CRContext *pContext, PSSMHANDLE pSSM);
    229 DECLEXPORT(int32_t) crStateLoadContext(CRContext *pContext, CRHashTable * pCtxTable, PSSMHANDLE pSSM);
     230typedef DECLCALLBACK(CRContext*) FNCRSTATE_CONTEXT_GET(void*);
     231typedef FNCRSTATE_CONTEXT_GET *PFNCRSTATE_CONTEXT_GET;
     232DECLEXPORT(int32_t) crStateLoadContext(CRContext *pContext, CRHashTable * pCtxTable, PFNCRSTATE_CONTEXT_GET pfnCtxGet, PSSMHANDLE pSSM);
    230233DECLEXPORT(void)    crStateFreeShared(CRSharedState *s);
    231234#endif
  • trunk/src/VBox/GuestHost/OpenGL/include/cr_server.h

    r39603 r40691  
    104104} CRMuralInfo;
    105105
     106typedef struct {
     107    char   *pszDpyName;
     108    GLint   visualBits;
     109    int32_t internalID;
     110} CRCreateInfo_t;
     111
     112typedef struct {
     113    CRContext *pContext;
     114    int SpuContext;
     115    CRCreateInfo_t CreateInfo;
     116} CRContextInfo;
     117
    106118/**
    107119 * A client is basically an upstream Cr Node (connected via mothership)
     
    113125    uint64_t pid;      /*guest pid*/
    114126    GLint currentContextNumber;
    115     CRContext *currentCtx;
     127    CRContextInfo *currentCtxInfo;
    116128    GLint currentWindow;
    117129    CRMuralInfo *currentMural;
     
    173185    GLboolean bIsInLoadingState; /* Indicates if we're in process of loading VM snapshot */
    174186    GLboolean bIsInSavingState; /* Indicates if we're in process of saving VM snapshot */
     187    CRContextInfo *currentCtxInfo;
    175188    GLint currentWindow;
    176189    GLint currentNativeWindow;
     
    195208    CRLimitsState limits; /**< GL limits for any contexts we create */
    196209
    197     int SpuContext; /**< Rendering context for the head SPU */
    198     int SpuContextVisBits; /**< Context's visual attributes */
    199     char *SpuContextDpyName; /**< Context's dpyName */
     210    CRContextInfo MainContextInfo;
    200211
    201212    CRHashTable *contextTable;  /**< hash table for rendering contexts */
    202     CRHashTable *pContextCreateInfoTable; /**< hash table with contexts creation info */
    203     CRContext *DummyContext;    /**< used when no other bound context */
    204213
    205214    CRHashTable *programTable;  /**< for vertex programs */
     
    267276    GLboolean             bUseOutputRedirect;       /* Whether the output redirect was set. */
    268277    CROutputRedirect      outputRedirect;
     278
     279    GLboolean             bUseMultipleContexts;
    269280} CRServer;
    270281
  • trunk/src/VBox/GuestHost/OpenGL/include/cr_spu.h

    r36231 r40691  
    137137typedef HGLRC (WGL_APIENTRY *wglCreateContextFunc_t)(HDC);
    138138typedef void (WGL_APIENTRY *wglDeleteContextFunc_t)(HGLRC);
     139typedef BOOL (WGL_APIENTRY *wglShareListsFunc_t)(HGLRC,HGLRC);
    139140typedef BOOL (WGL_APIENTRY *wglMakeCurrentFunc_t)(HDC,HGLRC);
    140141typedef BOOL (WGL_APIENTRY *wglSwapBuffersFunc_t)(HDC);
     
    315316    wglCreateContextFunc_t wglCreateContext;
    316317    wglDeleteContextFunc_t wglDeleteContext;
     318    wglShareListsFunc_t wglShareLists;
    317319    wglMakeCurrentFunc_t wglMakeCurrent;
    318320    wglSwapBuffersFunc_t wglSwapBuffers;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette