VirtualBox

Ignore:
Timestamp:
Jul 9, 2009 10:03:37 AM (15 years ago)
Author:
vboxsync
Message:

crOpenGL: fix VBOs support on 32/64 or 64/32 guest/host combinations

File:
1 edited

Legend:

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

    r21309 r21422  
    4141
    4242    packet_length = sizeof(GLenum)
    43         + sizeof(target) + sizeof(size) + sizeof(usage) + sizeof(GLboolean);
     43        + sizeof(target) + sizeof(GLuint) + sizeof(usage) + sizeof(GLboolean);
    4444
    4545    /*Note: it's valid to pass a NULL pointer here, which tells GPU drivers to allocate memory for the VBO*/
     
    5050    WRITE_DATA_AI(GLenum, CR_BUFFERDATAARB_EXTEND_OPCODE);
    5151    WRITE_DATA_AI(GLenum, target);
    52     WRITE_DATA_AI(GLsizeiptrARB, size);
     52    WRITE_DATA_AI(GLuint, (GLuint) size);
    5353    WRITE_DATA_AI(GLenum, usage);
    5454    WRITE_DATA_AI(GLboolean, (GLboolean) (data!=NULL));
     
    7272
    7373    packet_length = sizeof(GLenum)
    74         + sizeof(target) + sizeof(offset) + sizeof(size) + size;
     74        + sizeof(target) + sizeof(GLuint) + sizeof(GLuint) + size;
    7575
    7676    start_ptr = data_ptr = (unsigned char *) crPackAlloc(packet_length);
    7777    WRITE_DATA_AI(GLenum, CR_BUFFERSUBDATAARB_EXTEND_OPCODE);
    7878    WRITE_DATA_AI(GLenum, target);
    79     WRITE_DATA_AI(GLintptrARB, offset);
    80     WRITE_DATA_AI(GLsizeiptrARB, size);
     79    WRITE_DATA_AI(GLuint, (GLuint) offset);
     80    WRITE_DATA_AI(GLuint, (GLuint) size);
    8181    crMemcpy(data_ptr, data, size);
    8282
     
    8585}
    8686
     87void PACK_APIENTRY
     88crPackGetBufferSubDataARB( GLenum target, GLintptrARB offset, GLsizeiptrARB size, void * data, int * writeback )
     89{
     90        GET_PACKER_CONTEXT(pc);
     91        unsigned char *data_ptr;
     92        (void) pc;
     93        GET_BUFFERED_POINTER( pc, 36 );
     94        WRITE_DATA( 0, GLint, 36 );
     95        WRITE_DATA( 4, GLenum, CR_GETBUFFERSUBDATAARB_EXTEND_OPCODE );
     96        WRITE_DATA( 8, GLenum, target );
     97        WRITE_DATA( 12, GLuint, (GLuint) offset );
     98        WRITE_DATA( 16, GLuint, (GLuint) size );
     99        WRITE_NETWORK_POINTER( 20, (void *) data );
     100        WRITE_NETWORK_POINTER( 28, (void *) writeback );
     101        WRITE_OPCODE( pc, CR_EXTEND_OPCODE );
     102}
    87103
    88104void PACK_APIENTRY
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