VirtualBox

Changeset 21310 in vbox for trunk/src/VBox/GuestHost


Ignore:
Timestamp:
Jul 7, 2009 10:52:50 AM (16 years ago)
Author:
vboxsync
Message:

crOpenGL: host VBOs another file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/OpenGL/packer/pack_swap.py

    r21306 r21310  
    3636        the_index = min( min( paren_index, space_index ), quote_index )
    3737        print "%sSWAP%s" % (line[:the_index], line[the_index:])
     38    elif line.find("WRITE_DATA_AI") != -1:
     39        lparen_index = line.find( "(" )
     40        rparen_index = line.rfind( ")" )
     41        args = map( string.strip, line[lparen_index+1:rparen_index].split( "," ) )
     42        indentation = line[:line.find( "WRITE_DATA_AI" )]
     43        if apiutil.sizeof(args[0]) == 1:
     44            print "%sWRITE_DATA_AI(%s, %s);" % (indentation, args[0], args[1])
     45        elif apiutil.sizeof(args[0]) == 2:
     46            print "%sWRITE_DATA_AI(%s, SWAP16(%s) );" % (indentation, args[0], args[1])
     47        elif args[0] == 'GLfloat' or args[0] == 'GLclampf':
     48            print "%sWRITE_DATA_AI(GLuint, SWAPFLOAT(%s) );" % (indentation, args[0])
     49        elif apiutil.sizeof(args[0]) == 4:
     50            print "%sWRITE_DATA_AI(%s, SWAP32(%s) );" % (indentation, args[0], args[1])
     51        else:
     52            print >> sys.stderr, "UNKNOWN TYPE FOR WRITE_DATA: %s" % args[1]
     53            sys.exit(-1)
    3854    elif line.find( "WRITE_DATA" ) != -1:
    3955        lparen_index = line.find( "(" )
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