blob: 69ff4175b86b68906b3b58a0336a9c4af8f8eb14 [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
}