blob: ae45be53b6c9e6bffe61426f4909a659787ed724 [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 = (NSWindow*)sapp_macos_get_window();
NSOpenGLView* sokolView = (NSOpenGLView*)window.contentView;
NSOpenGLContext* ctx = [sokolView openGLContext];
[ctx makeCurrentContext];
#endif
}