first try for osx core profile

now it doesn't crash, but it still hangs on startup
This commit is contained in:
degasus 2013-01-31 12:20:17 +01:00
parent 01d8c21e1d
commit c05f66bdd0
3 changed files with 8 additions and 2 deletions

View File

@ -57,7 +57,7 @@ bool cInterfaceAGL::Create(void *&window_handle)
}
GLWin.cocoaCtx = [[NSOpenGLContext alloc]
initWithFormat: fmt shareContext: nil];
initWithFormat: fmt shareContext: nil kCGLPFAOpenGLProfile: kCGLOGLPVersion_3_2_Core ];
[fmt release];
if (GLWin.cocoaCtx == nil) {
ERROR_LOG(VIDEO, "failed to create context");

View File

@ -257,6 +257,9 @@ Renderer::Renderer()
}
// Init extension support.
#ifdef __APPLE__
glewExperimental = 1;
#endif
if (glewInit() != GLEW_OK)
{
ERROR_LOG(VIDEO, "glewInit() failed! Does your video card support OpenGL 2.x?");

View File

@ -141,9 +141,12 @@ void VideoSoftware::Shutdown()
void VideoSoftware::Video_Prepare()
{
GLInterface->MakeCurrent();
// Init extension support.
// Init extension support.
{
#ifndef USE_GLES
#ifdef __APPLE__
glewExperimental = 1;
#endif
if (glewInit() != GLEW_OK) {
ERROR_LOG(VIDEO, "glewInit() failed!Does your video card support OpenGL 2.x?");
return;