VirtualBox

Changeset 50441 in vbox


Ignore:
Timestamp:
02/13/2014 11:24:52 AM (9 years ago)
Author:
vboxsync
Message:

crOpenGL better treat max vertex attrib

Location:
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_dispatch.py

    r20147 r50441  
    4747    current = 0 
    4848    array = "" 
     49    condition = "" 
    4950    m = re.search( r"^(Color|Normal)([1234])(ub|b|us|s|ui|i|f|d)$", func_name ) 
    5051    if m : 
     
    9293        type = m.group(3) + m.group(2) 
    9394        array = "[index]" 
     95        condition = "if (index < CR_MAX_VERTEX_ATTRIBS)" 
    9496    if func_name == "VertexAttrib4NubARB": 
    9597        current = 1 
     
    9799        type = "ub4" 
    98100        array = "[index]" 
     101        condition = "if (index < CR_MAX_VERTEX_ATTRIBS)" 
    99102 
    100103    if current: 
     
    102105        print 'void SERVER_DISPATCH_APIENTRY crServerDispatch%s( %s )' % ( func_name, apiutil.MakeDeclarationString(params) ) 
    103106        print '{' 
    104         print '\tcr_server.head_spu->dispatch_table.%s( %s );' % (func_name, apiutil.MakeCallString(params) ) 
    105         print "\tcr_server.current.c.%s.%s%s = cr_unpackData;" % (name,type,array) 
     107        print '\t%s' % (condition) 
     108        print '\t{' 
     109        print '\n\tcr_server.head_spu->dispatch_table.%s( %s );' % (func_name, apiutil.MakeCallString(params) ) 
     110        print "\t\tcr_server.current.c.%s.%s%s = cr_unpackData;" % (name,type,array) 
     111        print '\t}' 
    106112        print '}\n'  
    107113 
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_simpleget.py

    r46173 r50441  
    139139        }  
    140140    } 
    141     """ % (types[index], types[index], types[index], types[index], types[index], types[index], types[index], types[index], types[index], types[index], types[index], types[index], types[index]) 
     141    else if (GL_MAX_VERTEX_ATTRIBS_ARB==pname) 
     142    { 
     143        if (CR_MAX_VERTEX_ATTRIBS < (GLuint)*get_values) 
     144        { 
     145            *get_values = (%s)CR_MAX_VERTEX_ATTRIBS; 
     146        }  
     147    } 
     148    """ % (types[index], types[index], types[index], types[index], types[index], types[index], types[index], types[index], types[index], types[index], types[index], types[index], types[index], types[index]) 
    142149    print '\tcrServerReturnValue( get_values, tablesize );' 
    143150    print '\tcrFree(get_values);' 
Note: See TracChangeset for help on using the changeset viewer.

www.oracle.com
ContactPrivacy policyTerms of Use