mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-08 04:08:32 +09:00
[Feat] (MG_Impl): add macOS CGL and NSOpenGL frontends
This commit is contained in:
@@ -7,6 +7,13 @@
|
||||
// End of Source File Header
|
||||
|
||||
#include "GetProcAddress.h"
|
||||
#if defined(__APPLE__)
|
||||
#ifndef GL_SILENCE_DEPRECATION
|
||||
#define GL_SILENCE_DEPRECATION
|
||||
#endif
|
||||
#include <OpenGL/OpenGL.h>
|
||||
#endif
|
||||
|
||||
#define GETPROC(name, var) \
|
||||
if (strcmp(#name, var) == 0) { \
|
||||
return (void*)name; \
|
||||
@@ -60,6 +67,32 @@ namespace MobileGL::MG_Impl {
|
||||
GETPROC(eglCreatePlatformPixmapSurface, name);
|
||||
GETPROC(eglWaitSync, name);
|
||||
|
||||
#if defined(__APPLE__)
|
||||
GETPROC(CGLChoosePixelFormat, name);
|
||||
GETPROC(CGLDestroyPixelFormat, name);
|
||||
GETPROC(CGLDescribePixelFormat, name);
|
||||
GETPROC(CGLReleasePixelFormat, name);
|
||||
GETPROC(CGLRetainPixelFormat, name);
|
||||
GETPROC(CGLGetPixelFormatRetainCount, name);
|
||||
GETPROC(CGLCreateContext, name);
|
||||
GETPROC(CGLDestroyContext, name);
|
||||
GETPROC(CGLRetainContext, name);
|
||||
GETPROC(CGLReleaseContext, name);
|
||||
GETPROC(CGLGetContextRetainCount, name);
|
||||
GETPROC(CGLGetPixelFormat, name);
|
||||
GETPROC(CGLSetCurrentContext, name);
|
||||
GETPROC(CGLGetCurrentContext, name);
|
||||
GETPROC(CGLSetParameter, name);
|
||||
GETPROC(CGLGetParameter, name);
|
||||
GETPROC(CGLUpdateContext, name);
|
||||
GETPROC(CGLClearDrawable, name);
|
||||
GETPROC(CGLFlushDrawable, name);
|
||||
GETPROC(CGLLockContext, name);
|
||||
GETPROC(CGLUnlockContext, name);
|
||||
GETPROC(CGLGetVersion, name);
|
||||
GETPROC(CGLErrorString, name);
|
||||
#endif
|
||||
|
||||
GETPROC(glCullFace, name);
|
||||
GETPROC(glFrontFace, name);
|
||||
GETPROC(glHint, name);
|
||||
|
||||
Reference in New Issue
Block a user