Path: blob/main_old/src/common/gl/cgl/FunctionsCGL.cpp
1694 views
//1// Copyright 2020 The ANGLE Project Authors. All rights reserved.2// Use of this source code is governed by a BSD-style license that can be3// found in the LICENSE file.4//56// FunctionsCGL.cpp: Exposing the soft-linked CGL interface.78#include "common/gl/cgl/FunctionsCGL.h"9#include "common/platform.h"1011#if defined(ANGLE_PLATFORM_MACOS) || defined(ANGLE_PLATFORM_MACCATALYST)1213SOFT_LINK_FRAMEWORK_SOURCE(OpenGL)1415SOFT_LINK_FUNCTION_SOURCE(OpenGL,16CGLChoosePixelFormat,17CGLError,18(const CGLPixelFormatAttribute *attribs,19CGLPixelFormatObj *pix,20GLint *npix),21(attribs, pix, npix))22SOFT_LINK_FUNCTION_SOURCE(OpenGL,23CGLCreateContext,24CGLError,25(CGLPixelFormatObj pix, CGLContextObj share, CGLContextObj *ctx),26(pix, share, ctx))27SOFT_LINK_FUNCTION_SOURCE(28OpenGL,29CGLDescribePixelFormat,30CGLError,31(CGLPixelFormatObj pix, GLint pix_num, CGLPixelFormatAttribute attrib, GLint *value),32(pix, pix_num, attrib, value))33SOFT_LINK_FUNCTION_SOURCE(OpenGL, CGLDestroyContext, CGLError, (CGLContextObj ctx), (ctx))34SOFT_LINK_FUNCTION_SOURCE(OpenGL, CGLDestroyPixelFormat, CGLError, (CGLPixelFormatObj pix), (pix))35SOFT_LINK_FUNCTION_SOURCE(OpenGL, CGLErrorString, const char *, (CGLError error), (error))36SOFT_LINK_FUNCTION_SOURCE(OpenGL, CGLReleaseContext, void, (CGLContextObj ctx), (ctx))37SOFT_LINK_FUNCTION_SOURCE(OpenGL, CGLGetCurrentContext, CGLContextObj, (void), ())38SOFT_LINK_FUNCTION_SOURCE(OpenGL, CGLSetCurrentContext, CGLError, (CGLContextObj ctx), (ctx))39SOFT_LINK_FUNCTION_SOURCE(OpenGL,40CGLSetVirtualScreen,41CGLError,42(CGLContextObj ctx, GLint screen),43(ctx, screen))44SOFT_LINK_FUNCTION_SOURCE(45OpenGL,46CGLTexImageIOSurface2D,47CGLError,48(CGLContextObj ctx,49GLenum target,50GLenum internal_format,51GLsizei width,52GLsizei height,53GLenum format,54GLenum type,55IOSurfaceRef ioSurface,56GLuint plane),57(ctx, target, internal_format, width, height, format, type, ioSurface, plane))58SOFT_LINK_FUNCTION_SOURCE(OpenGL, CGLUpdateContext, CGLError, (CGLContextObj ctx), (ctx))5960SOFT_LINK_FUNCTION_SOURCE(61OpenGL,62CGLDescribeRenderer,63CGLError,64(CGLRendererInfoObj rend, GLint rend_num, CGLRendererProperty prop, GLint *value),65(rend, rend_num, prop, value))66SOFT_LINK_FUNCTION_SOURCE(OpenGL,67CGLDestroyRendererInfo,68CGLError,69(CGLRendererInfoObj rend),70(rend))71SOFT_LINK_FUNCTION_SOURCE(OpenGL,72CGLQueryRendererInfo,73CGLError,74(GLuint display_mask, CGLRendererInfoObj *rend, GLint *nrend),75(display_mask, rend, nrend))7677#endif // defined(ANGLE_PLATFORM_MACOS) || defined(ANGLE_PLATFORM_MACCATALYST)787980