From 70e60a3c4c1698e699cebbd1bb92404b21233cd3 Mon Sep 17 00:00:00 2001 From: ocornut Date: Thu, 6 Aug 2026 23:01:56 +0200 Subject: [PATCH] Examples: Apple+OpenGL2: silence warnings. Example is precisely to demonstrate OpenGL. --- examples/example_apple_opengl2/main.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/example_apple_opengl2/main.mm b/examples/example_apple_opengl2/main.mm index 1cfa882c8..65c169089 100644 --- a/examples/example_apple_opengl2/main.mm +++ b/examples/example_apple_opengl2/main.mm @@ -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 #import #import @@ -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