VirtualBox

Changeset 20401 in vbox


Ignore:
Timestamp:
Jun 8, 2009 1:08:00 PM (16 years ago)
Author:
vboxsync
Message:

crOpenGL: make glview happy to report our GLSL version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_getstring.c

    r20392 r20401  
    1010#include "cr_string.h"
    1111#include "packspu_proto.h"
     12
     13static GLubyte gpszExtensions[10000];
     14#ifdef CR_OPENGL_VERSION_2_0
     15static GLubyte gpszShadingVersion[255]="";
     16#endif
    1217
    1318static const GLubyte *
     
    4146    ext = crStateMergeExtensions(1, &extensions);
    4247
    43     return ext;  /* XXX we should return a static string here! */
     48#ifdef CR_OPENGL_VERSION_2_0
     49    /* This extension is a core part of opengl 2.0, yet
     50     * some apps (like glview) request us to have this extension.
     51     * @todo, check if host supports opengl 2.0 or this extension
     52     * before exporting it.
     53     */
     54    sprintf(gpszExtensions, "%s GL_ARB_shading_language_100", ext);
     55#else
     56    sprintf(gpszExtensions, "%s", ext);
     57#endif
     58
     59    return gpszExtensions;
    4460}
    4561
     
    6985    return version;
    7086}
    71 
    72 #ifdef CR_OPENGL_VERSION_2_0
    73 static GLubyte gpszShadingVersion[255]="";
    74 #endif
    7587
    7688const GLubyte * PACKSPU_APIENTRY packspu_GetString( GLenum name )
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