VirtualBox

Ignore:
Timestamp:
May 3, 2019 9:51:02 PM (6 years ago)
Author:
vboxsync
Message:

Additions/common/crOpengl,GuestHost/OpenGL,HostServices/SharedOpenGL: Eliminate all global variables from the state tracker library (state_tracker) in preparation of the SPU DLL merging, bugref:9435

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_hint.c

    r69392 r78375  
    1313{
    1414        CRHintState *h = &ctx->hint;
    15         CRStateBits *sb = GetCurrentBits();
     15        CRStateBits *sb = GetCurrentBits(ctx->pStateTracker);
    1616        CRHintBits *hb = &(sb->hint);
    1717
     
    4141}
    4242
    43 void STATE_APIENTRY crStateHint(GLenum target, GLenum mode)
     43void STATE_APIENTRY crStateHint(PCRStateTracker pState, GLenum target, GLenum mode)
    4444{
    45         CRContext *g = GetCurrentContext();
     45        CRContext *g = GetCurrentContext(pState);
    4646        CRHintState *h = &(g->hint);
    47         CRStateBits *sb = GetCurrentBits();
     47        CRStateBits *sb = GetCurrentBits(pState);
    4848        CRHintBits *hb = &(sb->hint);
    4949
    5050        if (g->current.inBeginEnd)
    5151        {
    52                 crStateError(__LINE__, __FILE__, GL_INVALID_OPERATION,
     52                crStateError(pState, __LINE__, __FILE__, GL_INVALID_OPERATION,
    5353                                         "glHint called in Begin/End");
    5454                return;
     
    5858
    5959        if (mode != GL_FASTEST && mode != GL_NICEST && mode != GL_DONT_CARE) {
    60                 crStateError(__LINE__, __FILE__, GL_INVALID_ENUM,
     60                crStateError(pState, __LINE__, __FILE__, GL_INVALID_ENUM,
    6161                                         "glHint(mode)");
    6262                return;
     
    9191                }
    9292                else {
    93                         crStateError(__LINE__, __FILE__, GL_INVALID_ENUM,
     93                        crStateError(pState, __LINE__, __FILE__, GL_INVALID_ENUM,
    9494                                                 "glHint(target)");
    9595                        return;
     
    104104                }
    105105                else {
    106                         crStateError(__LINE__, __FILE__, GL_INVALID_ENUM,
     106                        crStateError(pState, __LINE__, __FILE__, GL_INVALID_ENUM,
    107107                                                 "glHint(target)");
    108108                        return;
     
    117117                }
    118118                else {
    119                         crStateError(__LINE__, __FILE__, GL_INVALID_ENUM,
     119                        crStateError(pState, __LINE__, __FILE__, GL_INVALID_ENUM,
    120120                                                 "glHint(target)");
    121121                        return;
     
    124124#endif
    125125        default:
    126                 crStateError(__LINE__, __FILE__, GL_INVALID_ENUM,
     126                crStateError(pState, __LINE__, __FILE__, GL_INVALID_ENUM,
    127127                                         "glHint(target)");
    128128                return;
Note: See TracChangeset for help on using the changeset viewer.

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