kusano 7d535a
#include <stdio.h></stdio.h>
kusano 7d535a
#include <stdlib.h></stdlib.h>
kusano 7d535a
#include <string.h></string.h>
kusano 7d535a
#include <gl glew.h=""></gl>
kusano 7d535a
#if defined(_WIN32)
kusano 7d535a
#include <gl wglew.h=""></gl>
kusano 7d535a
#elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX)
kusano 7d535a
#include <gl glxew.h=""></gl>
kusano 7d535a
#endif
kusano 7d535a
kusano 7d535a
#ifdef GLEW_REGAL
kusano 7d535a
#include <gl regal.h=""></gl>
kusano 7d535a
#endif
kusano 7d535a
kusano 7d535a
static FILE* f;
kusano 7d535a
kusano 7d535a
#ifdef GLEW_MX
kusano 7d535a
GLEWContext _glewctx;
kusano 7d535a
#define glewGetContext() (&_glewctx)
kusano 7d535a
#ifdef _WIN32
kusano 7d535a
WGLEWContext _wglewctx;
kusano 7d535a
#define wglewGetContext() (&_wglewctx)
kusano 7d535a
#elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX)
kusano 7d535a
GLXEWContext _glxewctx;
kusano 7d535a
#define glxewGetContext() (&_glxewctx)
kusano 7d535a
#endif
kusano 7d535a
#endif
kusano 7d535a
kusano 7d535a
#if defined(_WIN32)
kusano 7d535a
GLboolean glewCreateContext (int* pixelformat);
kusano 7d535a
#elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX)
kusano 7d535a
GLboolean glewCreateContext (const char* display, int* visual);
kusano 7d535a
#else
kusano 7d535a
GLboolean glewCreateContext ();
kusano 7d535a
#endif
kusano 7d535a
kusano 7d535a
#if defined(_WIN32) || !defined(__APPLE__) || defined(GLEW_APPLE_GLX)
kusano 7d535a
GLboolean glewParseArgs (int argc, char** argv, char** display, int* visual);
kusano 7d535a
#endif
kusano 7d535a
kusano 7d535a
void glewDestroyContext ();
kusano 7d535a
kusano 7d535a
/* ------------------------------------------------------------------------- */
kusano 7d535a
kusano 7d535a
static void glewPrintExt (const char* name, GLboolean def1, GLboolean def2, GLboolean def3)
kusano 7d535a
{
kusano 7d535a
  unsigned int i;
kusano 7d535a
  fprintf(f, "\n%s:", name);
kusano 7d535a
  for (i=0; i<62-strlen(name); i++) fprintf(f, " ");
kusano 7d535a
  fprintf(f, "%s ", def1 ? "OK" : "MISSING");
kusano 7d535a
  if (def1 != def2)
kusano 7d535a
    fprintf(f, "[%s] ", def2 ? "OK" : "MISSING");
kusano 7d535a
  if (def1 != def3)
kusano 7d535a
    fprintf(f, "[%s]\n", def3 ? "OK" : "MISSING");
kusano 7d535a
  else
kusano 7d535a
    fprintf(f, "\n");
kusano 7d535a
  for (i=0; i
kusano 7d535a
  fprintf(f, "\n");
kusano 7d535a
  fflush(f);
kusano 7d535a
}
kusano 7d535a
kusano 7d535a
static void glewInfoFunc (const char* name, GLint undefined)
kusano 7d535a
{
kusano 7d535a
  unsigned int i;
kusano 7d535a
  fprintf(f, "  %s:", name);
kusano 7d535a
  for (i=0; i<60-strlen(name); i++) fprintf(f, " ");
kusano 7d535a
  fprintf(f, "%s\n", undefined ? "MISSING" : "OK");
kusano 7d535a
  fflush(f);
kusano 7d535a
}
kusano 7d535a
kusano 7d535a
/* ----------------------------- GL_VERSION_1_1 ---------------------------- */
kusano 7d535a
kusano 7d535a
#ifdef GL_VERSION_1_1
kusano 7d535a
kusano 7d535a
static void _glewInfo_GL_VERSION_1_1 (void)
kusano 7d535a
{
kusano 7d535a
  glewPrintExt("GL_VERSION_1_1", GLEW_VERSION_1_1, GLEW_VERSION_1_1, GLEW_VERSION_1_1);
kusano 7d535a
}
kusano 7d535a
kusano 7d535a
#endif /* GL_VERSION_1_1 */
kusano 7d535a