Commit dd41d036 authored by Ken Martin's avatar Ken Martin

fix reportcapabilities in Cocoa

It was using the old opengl approach, updated to newer
approach of not using glGetString(GL_EXTENSIONS)
parent 07b2c761
......@@ -13,6 +13,8 @@ PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#include "vtk_glew.h"
#include "vtkOpenGLRenderWindow.h"
#import <Cocoa/Cocoa.h>
#import "vtkCocoaMacOSXSDKCompatibility.h" // Needed to support old SDKs
......@@ -26,6 +28,7 @@ PURPOSE. See the above copyright notice for more information.
#import "vtkRendererCollection.h"
#import "vtkCocoaGLView.h"
#import <sstream>
vtkStandardNewMacro(vtkCocoaRenderWindow);
......@@ -414,13 +417,20 @@ const char* vtkCocoaRenderWindow::ReportCapabilities()
const char* glVendor = (const char*) glGetString(GL_VENDOR);
const char* glRenderer = (const char*) glGetString(GL_RENDERER);
const char* glVersion = (const char*) glGetString(GL_VERSION);
const char* glExtensions = (const char*) glGetString(GL_EXTENSIONS);
std::ostringstream strm;
strm << "OpenGL vendor string: " << glVendor
<< "\nOpenGL renderer string: " << glRenderer
<< "\nOpenGL version string: " << glVersion
<< "\nOpenGL extensions: " << glExtensions << endl;
<< "\nOpenGL version string: " << glVersion << endl;
strm << "OpenGL extensions: " << endl;
GLint n, i;
glGetIntegerv(GL_NUM_EXTENSIONS, &n);
for (i = 0; i < n; i++)
{
const char *ext = (const char *)glGetStringi(GL_EXTENSIONS, i);
strm << " " << ext << endl;
}
// Obtain the OpenGL context in order to keep track of the current screen.
NSOpenGLContext* context = (NSOpenGLContext*)this->GetContextId();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment