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_line.c

    r69392 r78375  
    1313{
    1414        CRLineState *l = &ctx->line;
    15         CRStateBits *sb = GetCurrentBits();
     15        CRStateBits *sb = GetCurrentBits(ctx->pStateTracker);
    1616        CRLineBits *lb = &(sb->line);
    1717
     
    3535}
    3636
    37 void STATE_APIENTRY crStateLineWidth(GLfloat width)
     37void STATE_APIENTRY crStateLineWidth(PCRStateTracker pState, GLfloat width)
    3838{
    39         CRContext *g = GetCurrentContext();
     39        CRContext *g = GetCurrentContext(pState);
    4040        CRLineState *l = &(g->line);
    41         CRStateBits *sb = GetCurrentBits();
     41        CRStateBits *sb = GetCurrentBits(pState);
    4242        CRLineBits *lb = &(sb->line);
    4343
    4444        if (g->current.inBeginEnd)
    4545        {
    46                 crStateError(__LINE__, __FILE__, GL_INVALID_OPERATION, "glLineWidth called in begin/end");
     46                crStateError(pState, __LINE__, __FILE__, GL_INVALID_OPERATION, "glLineWidth called in begin/end");
    4747                return;
    4848        }
     
    5252        if (width <= 0.0f)
    5353        {
    54                 crStateError(__LINE__, __FILE__, GL_INVALID_VALUE, "glLineWidth called with size <= 0.0: %f", width);
     54                crStateError(pState, __LINE__, __FILE__, GL_INVALID_VALUE, "glLineWidth called with size <= 0.0: %f", width);
    5555                return;
    5656        }
     
    6161}
    6262
    63 void STATE_APIENTRY crStateLineStipple(GLint factor, GLushort pattern)
     63void STATE_APIENTRY crStateLineStipple(PCRStateTracker pState, GLint factor, GLushort pattern)
    6464{
    65         CRContext *g = GetCurrentContext();
     65        CRContext *g = GetCurrentContext(pState);
    6666        CRLineState *l = &(g->line);
    67         CRStateBits *sb = GetCurrentBits();
     67        CRStateBits *sb = GetCurrentBits(pState);
    6868        CRLineBits *lb = &(sb->line);
    6969
    7070        if (g->current.inBeginEnd)
    7171        {
    72                 crStateError(__LINE__, __FILE__, GL_INVALID_OPERATION,
     72                crStateError(pState, __LINE__, __FILE__, GL_INVALID_OPERATION,
    7373                        "glLineStipple called in begin/end");
    7474                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