packspu_getstring.c revision 734bedd8d8fa8a9089ef63f58f12b8a6a2ed0731
/* Copyright (c) 2001, Stanford University
* All rights reserved
*
* See the file LICENSE.txt for information on redistributing this software.
*/
#include "packspu.h"
#include "cr_packfunctions.h"
#include "state/cr_statefuncs.h"
#include "cr_string.h"
#include "packspu_proto.h"
#include "cr_mem.h"
#include <locale.h>
#ifdef CR_OPENGL_VERSION_2_0
#endif
{
int writeback = 1;
else
packspuFlush( (void *) thread );
while (writeback)
crNetRecv();
}
static GLfloat
GetVersionString(void)
{
return version;
}
static const GLubyte *
GetExtensions(void)
{
int writeback = 1;
{
}
else
{
}
packspuFlush( (void *) thread );
while (writeback)
crNetRecv();
/* OK, we got the result from the server. Now we have to
* intersect is with the set of extensions that Chromium understands
* and tack on the Chromium-specific extensions.
*/
#ifdef Linux
/*@todo
*That's a hack to allow running Unity, it uses libnux which is calling extension functions
*glActiveStencilFaceEXT seems to be actually supported but the extension string isn't exported (for ex. on ATI HD4870),
*which leads to libglew setting function pointer to NULL and crashing Unity.
*/
#else
#endif
return gpszExtensions;
}
#ifdef WINDOWS
static bool packspuRunningUnderWine(void)
{
return NULL != GetModuleHandle("wined3d.dll") || NULL != GetModuleHandle("wined3dwddm.dll") || NULL != GetModuleHandle("wined3dwddm-x86.dll");
}
#endif
{
switch(name)
{
case GL_EXTENSIONS:
return GetExtensions();
case GL_VERSION:
#if 0 && defined(WINDOWS)
if (packspuRunningUnderWine())
{
return ctx->pszRealVersion;
}
else
#endif
{
char *oldlocale;
float version;
version = GetVersionString();
if (oldlocale)
{
}
}
case GL_VENDOR:
#ifdef WINDOWS
if (packspuRunningUnderWine())
{
return ctx->pszRealVendor;
}
else
#endif
{
return crStateGetString(name);
}
case GL_RENDERER:
#ifdef WINDOWS
if (packspuRunningUnderWine())
{
return ctx->pszRealRenderer;
}
else
#endif
{
return crStateGetString(name);
}
#ifdef CR_OPENGL_VERSION_2_0
return gpszShadingVersion;
#endif
#ifdef GL_CR_real_vendor_strings
case GL_REAL_VENDOR:
return ctx->pszRealVendor;
case GL_REAL_VERSION:
return ctx->pszRealVersion;
case GL_REAL_RENDERER:
return ctx->pszRealRenderer;
#endif
default:
return crStateGetString(name);
}
}