Skip to content
Snippets Groups Projects
Commit 468f25df authored by Sean McBride's avatar Sean McBride
Browse files

Removed all uses of deprecated NSOpenGLPFACompliant

Apple's docs say about this constant:
"effects should be considered undefined, and their use avoided"

"Undefined" is pretty stern discouragement!

Now vtkCocoaRenderWindow::SupportsOpenGL() returns true
simply if an OpenGL context exists.

Change-Id: I20d52fb747241e08ea732ed554b3462c461623ee
parent e234a80e
No related branches found
No related tags found
No related merge requests found
......@@ -482,16 +482,7 @@ int vtkCocoaRenderWindow::SupportsOpenGL()
{
return 0;
}
NSOpenGLContext* context = (NSOpenGLContext*)this->GetContextId();
GLint currentScreen = [context currentVirtualScreen];
NSOpenGLPixelFormat* pixelFormat = (NSOpenGLPixelFormat*)this->GetPixelFormat();
GLint pfd = 0;
[pixelFormat getValues: &pfd forAttribute: NSOpenGLPFACompliant forVirtualScreen: currentScreen];
int supportsOpenGL = (pfd == 0) ? 0 : 1;
return supportsOpenGL;
return 1;
}
//----------------------------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment