mirror of
https://github.com/ocornut/imgui.git
synced 2026-08-18 02:37:30 +08:00
Examples: Apple+OpenGL2: silence warnings.
Example is precisely to demonstrate OpenGL.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user