forked from joejulian/gio
gpu/internal/opengl,app/internal/wm: generalize desktop OpenGL support
This changes moves the macOS specific setup for desktop OpenGL to the portable opengl package. The opengl package already takes care of the desktop OpenGL setup for sRGB framebuffers, and by moving the code we avoid calling the wrong OpenGL functions in case both OpenGL.framework and ANGLE libGLESv2.dylib is linked into the program. Remove the interface casting expressions for gl.Functions; it wasn't worth the trouble to keep updated. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
#include <OpenGL/OpenGL.h>
|
||||
#include <OpenGL/gl3.h>
|
||||
#include "_cgo_export.h"
|
||||
|
||||
@interface GioGLContext : NSOpenGLContext
|
||||
@@ -79,10 +78,3 @@ void gio_unlockContext(CFTypeRef ctxRef) {
|
||||
CGLUnlockContext([ctx CGLContextObj]);
|
||||
}
|
||||
}
|
||||
|
||||
void gio_prepareContext(void) {
|
||||
// Bind a default VBA to emulate OpenGL ES 2.
|
||||
GLuint defVBA;
|
||||
glGenVertexArrays(1, &defVBA);
|
||||
glBindVertexArray(defVBA);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user