mirror of
https://github.com/Perlmint/glew-cmake.git
synced 2025-02-18 14:40:57 +00:00
Generate Sources of origin/master updated at Sun May 10 17:44:25 GMT 2015
This commit is contained in:
parent
cfcfbb5e6b
commit
2afabc5e36
@ -19000,6 +19000,17 @@ GLEW_VAR_EXPORT GLboolean __GLEW_WIN_swap_hint;
|
|||||||
#define GLEW_VERSION_MINOR 3
|
#define GLEW_VERSION_MINOR 3
|
||||||
#define GLEW_VERSION_MICRO 4
|
#define GLEW_VERSION_MICRO 4
|
||||||
|
|
||||||
|
/* ------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
/* GLEW version info */
|
||||||
|
|
||||||
|
/*
|
||||||
|
VERSION 1.12.0
|
||||||
|
VERSION_MAJOR 1
|
||||||
|
VERSION_MINOR 12
|
||||||
|
VERSION_MICRO 0
|
||||||
|
*/
|
||||||
|
|
||||||
/* API */
|
/* API */
|
||||||
#ifdef GLEW_MX
|
#ifdef GLEW_MX
|
||||||
|
|
||||||
|
@ -11257,26 +11257,34 @@ void glewDestroyContext ()
|
|||||||
|
|
||||||
#elif defined(__APPLE__) && !defined(GLEW_APPLE_GLX)
|
#elif defined(__APPLE__) && !defined(GLEW_APPLE_GLX)
|
||||||
|
|
||||||
#include <AGL/agl.h>
|
#include <OpenGL/OpenGL.h>
|
||||||
|
#include <OpenGL/CGLTypes.h>
|
||||||
|
|
||||||
AGLContext ctx, octx;
|
CGLContextObj ctx, octx;
|
||||||
|
|
||||||
GLboolean glewCreateContext ()
|
GLboolean glewCreateContext ()
|
||||||
{
|
{
|
||||||
int attrib[] = { AGL_RGBA, AGL_NONE };
|
const CGLPixelFormatAttribute attrib[4] =
|
||||||
AGLPixelFormat pf;
|
{
|
||||||
/*int major, minor;
|
kCGLPFAAccelerated, /* No software rendering */
|
||||||
SetPortWindowPort(wnd);
|
#if 0
|
||||||
aglGetVersion(&major, &minor);
|
kCGLPFAOpenGLProfile, /* OSX 10.7 Lion onwards */
|
||||||
fprintf(stderr, "GL %d.%d\n", major, minor);*/
|
(CGLPixelFormatAttribute) kCGLOGLPVersion_3_2_Core, /* 3.2 Core Context */
|
||||||
pf = aglChoosePixelFormat(NULL, 0, attrib);
|
#endif
|
||||||
if (NULL == pf) return GL_TRUE;
|
0
|
||||||
ctx = aglCreateContext(pf, NULL);
|
};
|
||||||
if (NULL == ctx || AGL_NO_ERROR != aglGetError()) return GL_TRUE;
|
CGLPixelFormatObj pf;
|
||||||
aglDestroyPixelFormat(pf);
|
GLint npix;
|
||||||
/*aglSetDrawable(ctx, GetWindowPort(wnd));*/
|
CGLError error;
|
||||||
octx = aglGetCurrentContext();
|
|
||||||
if (GL_FALSE == aglSetCurrentContext(ctx)) return GL_TRUE;
|
error = CGLChoosePixelFormat(attrib, &pf, &npix);
|
||||||
|
if (error) return GL_TRUE;
|
||||||
|
error = CGLCreateContext(pf, NULL, &ctx);
|
||||||
|
if (error) return GL_TRUE;
|
||||||
|
CGLReleasePixelFormat(pf);
|
||||||
|
octx = CGLGetCurrentContext();
|
||||||
|
error = CGLSetCurrentContext(ctx);
|
||||||
|
if (error) return GL_TRUE;
|
||||||
/* Needed for Regal on the Mac */
|
/* Needed for Regal on the Mac */
|
||||||
#if defined(GLEW_REGAL) && defined(__APPLE__)
|
#if defined(GLEW_REGAL) && defined(__APPLE__)
|
||||||
RegalMakeCurrent(ctx);
|
RegalMakeCurrent(ctx);
|
||||||
@ -11286,8 +11294,8 @@ GLboolean glewCreateContext ()
|
|||||||
|
|
||||||
void glewDestroyContext ()
|
void glewDestroyContext ()
|
||||||
{
|
{
|
||||||
aglSetCurrentContext(octx);
|
CGLSetCurrentContext(octx);
|
||||||
if (NULL != ctx) aglDestroyContext(ctx);
|
CGLReleaseContext(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ------------------------------------------------------------------------ */
|
/* ------------------------------------------------------------------------ */
|
||||||
|
Loading…
Reference in New Issue
Block a user