blob: 77e687a87a9f7bd5c83d6c7e47eae1fb9431b313 [file] [log] [blame]
#include "viewer/viewer.hpp"
#ifdef SOKOL_GLCORE33
#include "sokol_app.h"
#ifndef GL_SILENCE_DEPRECATION
#define GL_SILENCE_DEPRECATION
#endif
#import "Cocoa/Cocoa.h"
#endif
void bindGraphicsContext()
{
#ifdef SOKOL_GLCORE33
NSWindow* window = (__bridge NSWindow*)sapp_macos_get_window();
NSOpenGLView* sokolView = (NSOpenGLView*)window.contentView;
NSOpenGLContext* ctx = [sokolView openGLContext];
[ctx makeCurrentContext];
#endif
}