Sha256: fb0ea67ac253f2cb2d5b152987eb044e18784c193dcb661116fb15e79b86a4f9
Contents?: true
Size: 568 Bytes
Versions: 16
Compression:
Stored size: 568 Bytes
Contents
// -*- objc -*- #include "../opengl.h" #import <AppKit/AppKit.h> namespace Rays { void OpenGL_set_context (Context context) { NSOpenGLContext* c = (NSOpenGLContext*) context; [c makeCurrentContext]; } Context OpenGL_get_context () { return [NSOpenGLContext currentContext]; } Context get_offscreen_context () { static Context context = NULL; if (!context) { NSOpenGLPixelFormat* pf = [NSOpenGLView defaultPixelFormat]; context = [[NSOpenGLContext alloc] initWithFormat: pf shareContext: nil]; } return context; } }// Rays
Version data entries
16 entries across 16 versions & 1 rubygems