VirtualBox

Ignore:
Timestamp:
Dec 10, 2012 4:24:45 PM (12 years ago)
Author:
vboxsync
Message:

crOpenGL: more state fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_bufferobject.c

    r44079 r44083  
    7575            return NULL;
    7676    }
     77}
     78
     79DECLEXPORT(GLboolean) STATE_APIENTRY crStateIsBufferARB( GLuint buffer )
     80{
     81    CRContext *g = GetCurrentContext();
     82
     83    FLUSH();
     84
     85    if (g->current.inBeginEnd) {
     86        crStateError(__LINE__, __FILE__, GL_INVALID_OPERATION,
     87                                 "glIsBufferARB called in begin/end");
     88        return GL_FALSE;
     89    }
     90
     91    return buffer ? crHashtableIsKeyUsed(g->shared->buffersTable, buffer) : GL_FALSE;
    7792}
    7893
     
    347362}
    348363
    349 GLboolean STATE_APIENTRY
    350 crStateIsBufferARB(GLuint buffer)
    351 {
    352     CRContext *g = GetCurrentContext();
    353     CRBufferObjectState *b = &g->bufferobject;
    354 
    355     FLUSH();
    356 
    357     if (g->current.inBeginEnd) {
    358         crStateError(__LINE__, __FILE__, GL_INVALID_OPERATION,
    359                                  "glIsBufferARB called in begin/end");
    360         return GL_FALSE;
    361     }
    362 
    363     if (buffer && crHashtableSearch(g->shared->buffersTable, buffer))
    364         return GL_TRUE;
    365     else
    366         return GL_FALSE;
    367 }
    368 
    369 
    370364void STATE_APIENTRY
    371365crStateBufferDataARB(GLenum target, GLsizeiptrARB size, const GLvoid * data, GLenum usage)
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