Path: blob/main_old/src/common/gl/cgl/FunctionsCGL.h
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.h: Exposing the soft-linked CGL interface.78#ifndef CGL_FUNCTIONS_H_9#define CGL_FUNCTIONS_H_1011#include "common/platform.h"1213#if defined(ANGLE_PLATFORM_MACOS) || defined(ANGLE_PLATFORM_MACCATALYST)1415# include <OpenGL/OpenGL.h>1617# include "common/apple/SoftLinking.h"1819SOFT_LINK_FRAMEWORK_HEADER(OpenGL)2021SOFT_LINK_FUNCTION_HEADER(OpenGL,22CGLChoosePixelFormat,23CGLError,24(const CGLPixelFormatAttribute *attribs,25CGLPixelFormatObj *pix,26GLint *npix),27(attribs, pix, npix))28SOFT_LINK_FUNCTION_HEADER(OpenGL,29CGLCreateContext,30CGLError,31(CGLPixelFormatObj pix, CGLContextObj share, CGLContextObj *ctx),32(pix, share, ctx))33SOFT_LINK_FUNCTION_HEADER(34OpenGL,35CGLDescribePixelFormat,36CGLError,37(CGLPixelFormatObj pix, GLint pix_num, CGLPixelFormatAttribute attrib, GLint *value),38(pix, pix_num, attrib, value))39SOFT_LINK_FUNCTION_HEADER(40OpenGL,41CGLDescribeRenderer,42CGLError,43(CGLRendererInfoObj rend, GLint rend_num, CGLRendererProperty prop, GLint *value),44(rend, rend_num, prop, value))45SOFT_LINK_FUNCTION_HEADER(OpenGL, CGLDestroyContext, CGLError, (CGLContextObj ctx), (ctx))46SOFT_LINK_FUNCTION_HEADER(OpenGL, CGLDestroyPixelFormat, CGLError, (CGLPixelFormatObj pix), (pix))47SOFT_LINK_FUNCTION_HEADER(OpenGL,48CGLDestroyRendererInfo,49CGLError,50(CGLRendererInfoObj rend),51(rend))52SOFT_LINK_FUNCTION_HEADER(OpenGL, CGLErrorString, const char *, (CGLError error), (error))53SOFT_LINK_FUNCTION_HEADER(OpenGL,54CGLQueryRendererInfo,55CGLError,56(GLuint display_mask, CGLRendererInfoObj *rend, GLint *nrend),57(display_mask, rend, nrend))58SOFT_LINK_FUNCTION_HEADER(OpenGL, CGLReleaseContext, void, (CGLContextObj ctx), (ctx))59SOFT_LINK_FUNCTION_HEADER(OpenGL, CGLGetCurrentContext, CGLContextObj, (void), ())60SOFT_LINK_FUNCTION_HEADER(OpenGL, CGLSetCurrentContext, CGLError, (CGLContextObj ctx), (ctx))61SOFT_LINK_FUNCTION_HEADER(OpenGL,62CGLSetVirtualScreen,63CGLError,64(CGLContextObj ctx, GLint screen),65(ctx, screen))66SOFT_LINK_FUNCTION_HEADER(67OpenGL,68CGLTexImageIOSurface2D,69CGLError,70(CGLContextObj ctx,71GLenum target,72GLenum internal_format,73GLsizei width,74GLsizei height,75GLenum format,76GLenum type,77IOSurfaceRef ioSurface,78GLuint plane),79(ctx, target, internal_format, width, height, format, type, ioSurface, plane))80SOFT_LINK_FUNCTION_HEADER(OpenGL, CGLUpdateContext, CGLError, (CGLContextObj ctx), (ctx))8182#endif // defined(ANGLE_PLATFORM_MACOS) || defined(ANGLE_PLATFORM_MACCATALYST)8384#endif // CGL_FUNCTIONS_H_858687