Changeset 50441 in vbox
- Timestamp:
- Feb 13, 2014 11:24:52 AM (11 years ago)
- 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 47 47 current = 0 48 48 array = "" 49 condition = "" 49 50 m = re.search( r"^(Color|Normal)([1234])(ub|b|us|s|ui|i|f|d)$", func_name ) 50 51 if m : … … 92 93 type = m.group(3) + m.group(2) 93 94 array = "[index]" 95 condition = "if (index < CR_MAX_VERTEX_ATTRIBS)" 94 96 if func_name == "VertexAttrib4NubARB": 95 97 current = 1 … … 97 99 type = "ub4" 98 100 array = "[index]" 101 condition = "if (index < CR_MAX_VERTEX_ATTRIBS)" 99 102 100 103 if current: … … 102 105 print 'void SERVER_DISPATCH_APIENTRY crServerDispatch%s( %s )' % ( func_name, apiutil.MakeDeclarationString(params) ) 103 106 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}' 106 112 print '}\n' 107 113 -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_simpleget.py
r46173 r50441 139 139 } 140 140 } 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]) 142 149 print '\tcrServerReturnValue( get_values, tablesize );' 143 150 print '\tcrFree(get_values);'
Note:
See TracChangeset
for help on using the changeset viewer.