VirtualBox

Changeset 44930 in vbox for trunk/src/VBox/GuestHost/OpenGL


Ignore:
Timestamp:
Mar 6, 2013 10:29:33 AM (12 years ago)
Author:
vboxsync
Message:

crOpenGL: fix current program on state restore

File:
1 edited

Legend:

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

    r44529 r44930  
    11871187DECLEXPORT(void) STATE_APIENTRY crStateGLSLSwitch(CRContext *from, CRContext *to)
    11881188{
     1189    GLboolean fForceUseProgramSet = GL_FALSE;
    11891190    if (to->glsl.bResyncNeeded)
    11901191    {
     
    11951196        crHashtableWalk(to->glsl.programs, crStateGLSLCreateProgramCB, to);
    11961197
     1198        /* crStateGLSLCreateProgramCB changes the current program, ensure we have the proper program re-sored */
     1199        fForceUseProgramSet = GL_TRUE;
     1200
    11971201        crHashtableWalk(to->glsl.shaders, crStateGLSLSyncShadersCB, NULL);
    11981202    }
    11991203
    1200     if (to->glsl.activeProgram != from->glsl.activeProgram)
     1204    if (to->glsl.activeProgram != from->glsl.activeProgram || fForceUseProgramSet)
    12011205    {
    12021206        diff_api.UseProgram(to->glsl.activeProgram ? to->glsl.activeProgram->hwid : 0);
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