Examples: Apple+OpenGL2: silence warnings.

Example is precisely to demonstrate OpenGL.
This commit is contained in:
ocornut
2026-08-06 23:01:56 +02:00
parent 2ddb5fc095
commit 70e60a3c4c
+2 -1
View File
@@ -6,6 +6,7 @@
// - Documentation https://dearimgui.com/docs (same as your local docs/ folder).
// - Introduction, links and more at the top of imgui.cpp
#define GL_SILENCE_DEPRECATION
#import <Cocoa/Cocoa.h>
#import <OpenGL/gl.h>
#import <OpenGL/glu.h>
@@ -32,7 +33,7 @@
#ifndef DEBUG
GLint swapInterval = 1;
[[self openGLContext] setValues:&swapInterval forParameter:NSOpenGLCPSwapInterval];
[[self openGLContext] setValues:&swapInterval forParameter:NSOpenGLContextParameterSwapInterval];
if (swapInterval == 0)
NSLog(@"Error: Cannot set swap interval.");
#endif