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

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_arrays.c

    r21308 r21422  
    2424    GLenum type = READ_DATA( 12, GLenum );
    2525    GLsizei stride = READ_DATA( 16, GLsizei );
    26     GLintptrARB pointer = READ_DATA( 20, GLintptrARB );
     26    GLintptrARB pointer = (GLintptrARB) READ_DATA( 20, GLuint );
    2727    cr_unpackDispatch.VertexPointer( size, type, stride, (void *) pointer );
    2828}
     
    3333    GLenum type = READ_DATA( 12, GLenum );
    3434    GLsizei stride = READ_DATA( 16, GLsizei );
    35     GLintptrARB pointer = READ_DATA( 20, GLintptrARB );
     35    GLintptrARB pointer = READ_DATA( 20, GLuint );
    3636    cr_unpackDispatch.TexCoordPointer( size, type, stride, (void *) pointer );
    3737}
     
    4141    GLenum type = READ_DATA( 8, GLenum );
    4242    GLsizei stride = READ_DATA( 12, GLsizei );
    43     GLintptrARB pointer = READ_DATA( 16, GLintptrARB );
     43    GLintptrARB pointer = READ_DATA( 16, GLuint );
    4444    cr_unpackDispatch.NormalPointer( type, stride, (void *) pointer );
    4545}
     
    4949    GLenum type = READ_DATA( 8, GLenum );
    5050    GLsizei stride = READ_DATA( 12, GLsizei );
    51     GLintptrARB pointer = READ_DATA( 16, GLintptrARB );
     51    GLintptrARB pointer = READ_DATA( 16, GLuint );
    5252    cr_unpackDispatch.IndexPointer( type, stride, (void *) pointer );
    5353}
     
    5656{
    5757    GLsizei stride = READ_DATA( 8, GLsizei );
    58     GLintptrARB pointer = READ_DATA( 12, GLintptrARB );
     58    GLintptrARB pointer = READ_DATA( 12, GLuint );
    5959    cr_unpackDispatch.EdgeFlagPointer( stride, (void *) pointer );
    6060}
     
    6565    GLenum type = READ_DATA( 12, GLenum );
    6666    GLsizei stride = READ_DATA( 16, GLsizei );
    67     GLintptrARB pointer = READ_DATA( 20, GLintptrARB );
     67    GLintptrARB pointer = READ_DATA( 20, GLuint );
    6868    cr_unpackDispatch.ColorPointer( size, type, stride, (void *) pointer );
    6969}
     
    7373    GLenum type = READ_DATA( 8, GLenum );
    7474    GLsizei stride = READ_DATA( 12, GLsizei );
    75     GLintptrARB pointer = READ_DATA( 16, GLintptrARB );
     75    GLintptrARB pointer = READ_DATA( 16, GLuint );
    7676    cr_unpackDispatch.FogCoordPointerEXT( type, stride, (void *) pointer );
    7777}
     
    8282    GLenum type = READ_DATA( 12, GLenum );
    8383    GLsizei stride = READ_DATA( 16, GLsizei );
    84     GLintptrARB pointer = READ_DATA( 20, GLintptrARB );
     84    GLintptrARB pointer = READ_DATA( 20, GLuint );
    8585    cr_unpackDispatch.SecondaryColorPointerEXT( size, type, stride, (void *) pointer );
    8686}
     
    9393    GLboolean normalized = READ_DATA( 20, GLboolean );
    9494    GLsizei stride = READ_DATA( 24, GLsizei );
    95     GLintptrARB pointer = READ_DATA( 28, GLintptrARB );
     95    GLintptrARB pointer = READ_DATA( 28, GLuint );
    9696    cr_unpackDispatch.VertexAttribPointerARB( index, size, type, normalized, stride, (void *) pointer );
    9797}
     
    103103    GLenum type = READ_DATA( 16, GLenum );
    104104    GLsizei stride = READ_DATA( 20, GLsizei );
    105     GLintptrARB pointer = READ_DATA( 24, GLintptrARB );
     105    GLintptrARB pointer = READ_DATA( 24, GLuint );
    106106    cr_unpackDispatch.VertexAttribPointerNV( index, size, type, stride, (void *) pointer );
    107107}
     
    111111    GLenum format = READ_DATA( 8, GLenum );
    112112    GLsizei stride = READ_DATA( 12, GLsizei );
    113     GLintptrARB pointer = READ_DATA( 16, GLintptrARB );
     113    GLintptrARB pointer = READ_DATA( 16, GLuint );
    114114    cr_unpackDispatch.InterleavedArrays( format, stride, (void *) pointer );
    115115}
     
    120120    GLsizei count       = READ_DATA( 12, GLsizei );
    121121    GLenum type         = READ_DATA( 16, GLenum );
    122     GLintptrARB indices = READ_DATA( 20, GLintptrARB );
     122    GLintptrARB indices = READ_DATA( 20, GLuint );
    123123    void * indexptr;
    124124#ifdef CR_ARB_vertex_buffer_object
     
    128128    indexptr = DATA_POINTER(24, void);
    129129#endif
    130     /*crDebug("DrawElements: count=%i, indexptr=%p, hasidx=%p", count, indexptr, hasidxdata);*/
    131130    cr_unpackDispatch.DrawElements(mode, count, type, indexptr);
    132131}
     
    139138    GLsizei count       = READ_DATA( 20, GLsizei );
    140139    GLenum type         = READ_DATA( 24, GLenum );
    141     GLintptrARB indices = READ_DATA( 28, GLintptrARB );
     140    GLintptrARB indices = READ_DATA( 28, GLuint );
    142141    void * indexptr;
    143142#ifdef CR_ARB_vertex_buffer_object
  • trunk/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_bufferobject.c

    r21308 r21422  
    1313{
    1414    GLenum target = READ_DATA( 8, GLenum );
    15     GLintptrARB offset = READ_DATA( 12, GLint );
    16     GLsizeiptrARB size = READ_DATA( 16, GLint );
    17 #if 0
    18     GLvoid *data;
    19 #endif
     15    GLintptrARB offset = READ_DATA( 12, GLuint );
     16    GLsizeiptrARB size = READ_DATA( 16, GLuint );
    2017
    2118    SET_RETURN_PTR( 20 );
    2219    SET_WRITEBACK_PTR( 28 );
    23 #if 0
    24     crMemcpy( &data, DATA_POINTER( 20, GLvoid ), sizeof(data) );
    25     printf("%s data=%p\n", __FUNCTION__, data);
    26     cr_unpackDispatch.GetBufferSubDataARB( target, offset, size, data );
    27 #endif
     20
    2821    cr_unpackDispatch.GetBufferSubDataARB( target, offset, size, NULL );
    2922}
     
    3326{
    3427    GLenum target      = READ_DATA(sizeof(int) + 4, GLenum);
    35     GLsizeiptrARB size = READ_DATA(sizeof(int) + 8, GLsizeiptrARB);
     28    GLsizeiptrARB size = READ_DATA(sizeof(int) + 8, GLuint);
    3629    GLenum usage       = READ_DATA(sizeof(int) + 12, GLenum);
    3730    GLboolean hasdata  = READ_DATA(sizeof(int) + 16, GLboolean);
    3831    GLvoid *data       = DATA_POINTER(sizeof(int) + 16 + sizeof(GLboolean), GLvoid);
    39 
    40     CRASSERT(sizeof(GLsizeiptrARB) == 4);
    41     /*@todo, why?*/
    42     /*CRASSERT(usage == GL_STATIC_DRAW_ARB);*/
    4332
    4433    cr_unpackDispatch.BufferDataARB(target, size, hasdata ? data:NULL, usage);
     
    4938{
    5039    GLenum target = READ_DATA( sizeof(int) + 4, GLenum );
    51     GLintptrARB offset = READ_DATA( sizeof(int) + 8, GLintptrARB );
    52     GLsizeiptrARB size = READ_DATA( sizeof(int) + 12, GLsizeiptrARB );
     40    GLintptrARB offset = READ_DATA( sizeof(int) + 8, GLuint );
     41    GLsizeiptrARB size = READ_DATA( sizeof(int) + 12, GLuint );
    5342    GLvoid *data = DATA_POINTER( sizeof(int) + 16, GLvoid );
    5443
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