VirtualBox

Ignore:
Timestamp:
Jul 7, 2009 10:34:22 AM (15 years ago)
Author:
vboxsync
Message:

crOpenGL: tabs to spaces

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/OpenGL/packer/pack_bufferobject.c

    r15532 r21306  
    1313void PACK_APIENTRY
    1414crPackMapBufferARB( GLenum target, GLenum access,
    15                     void * return_value, int * writeback )
     15            void * return_value, int * writeback )
    1616{
    1717     (void)writeback;
     
    3535void PACK_APIENTRY
    3636crPackBufferDataARB( GLenum target, GLsizeiptrARB size,
    37                                                                                 const GLvoid * data, GLenum usage )
     37                                        const GLvoid * data, GLenum usage )
    3838{
    39         unsigned char *data_ptr;
    40         int packet_length;
     39    unsigned char *data_ptr;
     40    int packet_length;
    4141
    42         packet_length = sizeof(GLenum)
    43                 + sizeof(target) + sizeof(size) + sizeof(usage) + size;
     42    packet_length = sizeof(GLenum)
     43        + sizeof(target) + sizeof(size) + sizeof(usage) + size;
    4444
    45         data_ptr = (unsigned char *) crPackAlloc( packet_length );
     45    data_ptr = (unsigned char *) crPackAlloc( packet_length );
    4646
    47         WRITE_DATA( 0, GLenum, CR_BUFFERDATAARB_EXTEND_OPCODE );
    48         WRITE_DATA( 4, GLenum, target );
    49         WRITE_DATA( 8, GLsizeiptrARB, size ); /* XXX or 8 bytes? */
    50         WRITE_DATA( 12, GLenum, usage );
    51         if (data)
    52                 crMemcpy( data_ptr + 16, data, size );
     47    WRITE_DATA( 0, GLenum, CR_BUFFERDATAARB_EXTEND_OPCODE );
     48    WRITE_DATA( 4, GLenum, target );
     49    WRITE_DATA( 8, GLsizeiptrARB, size ); /* XXX or 8 bytes? */
     50    WRITE_DATA( 12, GLenum, usage );
     51    if (data)
     52        crMemcpy( data_ptr + 16, data, size );
    5353
    54         crHugePacket( CR_EXTEND_OPCODE, data_ptr );
     54    crHugePacket( CR_EXTEND_OPCODE, data_ptr );
    5555    crPackFree( data_ptr );
    5656}
     
    5959void PACK_APIENTRY
    6060crPackBufferSubDataARB( GLenum target, GLintptrARB offset, GLsizeiptrARB size,
    61                                                                                                 const GLvoid * data )
     61                                                const GLvoid * data )
    6262{
    63         unsigned char *data_ptr;
    64         int packet_length;
     63    unsigned char *data_ptr;
     64    int packet_length;
    6565
    66         if (!data)
    67                 return;
     66    if (!data)
     67        return;
    6868
    69         packet_length = sizeof(GLenum)
    70                 + sizeof(target) + sizeof(offset) + sizeof(size) + size;
     69    packet_length = sizeof(GLenum)
     70        + sizeof(target) + sizeof(offset) + sizeof(size) + size;
    7171
    72         data_ptr = (unsigned char *) crPackAlloc( packet_length );
    73         WRITE_DATA( 0, GLenum, CR_BUFFERSUBDATAARB_EXTEND_OPCODE );
    74         WRITE_DATA( 4, GLenum, target );
    75         WRITE_DATA( 8, GLintptrARB, offset ); /* XXX or 8 bytes? */
    76         WRITE_DATA( 12, GLsizeiptrARB, size ); /* XXX or 8 bytes? */
    77         crMemcpy( data_ptr + 16, data, size );
     72    data_ptr = (unsigned char *) crPackAlloc( packet_length );
     73    WRITE_DATA( 0, GLenum, CR_BUFFERSUBDATAARB_EXTEND_OPCODE );
     74    WRITE_DATA( 4, GLenum, target );
     75    WRITE_DATA( 8, GLintptrARB, offset ); /* XXX or 8 bytes? */
     76    WRITE_DATA( 12, GLsizeiptrARB, size ); /* XXX or 8 bytes? */
     77    crMemcpy( data_ptr + 16, data, size );
    7878
    79         crHugePacket( CR_EXTEND_OPCODE, data_ptr );
     79    crHugePacket( CR_EXTEND_OPCODE, data_ptr );
    8080    crPackFree( data_ptr );
    8181}
     
    8585crPackDeleteBuffersARB(GLsizei n, const GLuint * buffers)
    8686{
    87         unsigned char *data_ptr;
    88         int packet_length = sizeof(GLenum) + sizeof(n) + n * sizeof(*buffers);
     87    unsigned char *data_ptr;
     88    int packet_length = sizeof(GLenum) + sizeof(n) + n * sizeof(*buffers);
    8989
    90         if (!buffers)
    91                 return;
     90    if (!buffers)
     91        return;
    9292
    93         data_ptr = (unsigned char *) crPackAlloc(packet_length);
    94         WRITE_DATA( 0, GLenum, CR_DELETEBUFFERSARB_EXTEND_OPCODE );
    95         WRITE_DATA( 4, GLsizei, n );
    96         crMemcpy( data_ptr + 8, buffers, n * sizeof(*buffers) );
    97         crHugePacket( CR_EXTEND_OPCODE, data_ptr );
     93    data_ptr = (unsigned char *) crPackAlloc(packet_length);
     94    WRITE_DATA( 0, GLenum, CR_DELETEBUFFERSARB_EXTEND_OPCODE );
     95    WRITE_DATA( 4, GLsizei, n );
     96    crMemcpy( data_ptr + 8, buffers, n * sizeof(*buffers) );
     97    crHugePacket( CR_EXTEND_OPCODE, data_ptr );
    9898    crPackFree( data_ptr );
    9999}
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