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_get.py

    r69392 r78375  
    146146header = """
    147147{
    148         CRContext *g = GetCurrentContext();
     148        CRContext *g = GetCurrentContext(pState);
    149149
    150150        if (g->current.inBeginEnd)
    151151        {
    152                 crStateError(__LINE__, __FILE__, GL_INVALID_OPERATION,
     152                crStateError(pState, __LINE__, __FILE__, GL_INVALID_OPERATION,
    153153                        "glGet called in Begin/End");
    154154                return;
     
    162162        {
    163163#if 0
    164                 crStateError(__LINE__,__FILE__, GL_INVALID_OPERATION,
     164                crStateError(pState, __LINE__,__FILE__, GL_INVALID_OPERATION,
    165165                        "Unimplemented glGet of a 'current' value" );
    166166#else
    167                 crStateCurrentRecover();/* &g->current, &sb->current, g->bitID );*/
     167                crStateCurrentRecover(pState);/* &g->current, &sb->current, g->bitID );*/
    168168               
    169169#endif
     
    175175for rettype in types:
    176176        print('')
    177         print('void STATE_APIENTRY crStateGet%sv( GLenum pname, %s *params )' % ( rettype, ctypes[rettype] ))
     177        print('void STATE_APIENTRY crStateGet%sv(PCRStateTracker pState, GLenum pname, %s *params )' % ( rettype, ctypes[rettype] ))
    178178        print(header)
    179179
     
    189189                                i += 1
    190190                except:
    191                         print('\t\t\tcrStateError(__LINE__,__FILE__,GL_INVALID_OPERATION, "Unimplemented glGet!");')
     191                        print('\t\t\tcrStateError(pState, __LINE__,__FILE__,GL_INVALID_OPERATION, "Unimplemented glGet!");')
    192192                print("\t\t\tbreak;")
    193193
     
    216216                                i += 1
    217217                except:
    218                         print('\t\t\tcrStateError(__LINE__,__FILE__,GL_INVALID_OPERATION, "Unimplemented glGet!");')
     218                        print('\t\t\tcrStateError(pState, __LINE__,__FILE__,GL_INVALID_OPERATION, "Unimplemented glGet!");')
    219219                if ext != 'OPENGL_VERSION_1_2':
    220220                        print("\t\t\t}")
    221221                        print("\t\t\telse {")
    222                         print('\t\t\t\tcrStateError(__LINE__,__FILE__,GL_INVALID_ENUM, "glGet%sv");' % rettype)
     222                        print('\t\t\t\tcrStateError(pState, __LINE__,__FILE__,GL_INVALID_ENUM, "glGet%sv");' % rettype)
    223223                        print("\t\t\t}")
    224224                print("\t\t\tbreak;")
     
    227227
    228228        print('\t\tdefault:')
    229         print('\t\t\tcrStateError(__LINE__, __FILE__, GL_INVALID_ENUM, "glGet: Unknown enum: 0x%x", pname);')
     229        print('\t\t\tcrStateError(pState, __LINE__, __FILE__, GL_INVALID_ENUM, "glGet: Unknown enum: 0x%x", pname);')
    230230        print('\t\t\treturn;')
    231231        print('\t}')
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