// Copyright 2022 The Dawn Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #include "dawn/native/opengl/EGLFunctions.h" namespace dawn::native::opengl { void EGLFunctions::Init(void* (*getProc)(const char*)) { GetProcAddress = reinterpret_cast(getProc); BindAPI = reinterpret_cast(GetProcAddress("eglBindAPI")); ChooseConfig = reinterpret_cast(GetProcAddress("eglChooseConfig")); CreateContext = reinterpret_cast(GetProcAddress("eglCreateContext")); CreatePbufferSurface = reinterpret_cast(GetProcAddress("eglCreatePbufferSurface")); CreatePlatformWindowSurface = reinterpret_cast( GetProcAddress("eglCreatePlatformWindowSurface")); DestroyContext = reinterpret_cast(GetProcAddress("eglDestroyContext")); GetConfigs = reinterpret_cast(GetProcAddress("eglGetConfigs")); GetCurrentContext = reinterpret_cast(GetProcAddress("eglGetCurrentContext")); GetCurrentDisplay = reinterpret_cast(GetProcAddress("eglGetCurrentDisplay")); GetCurrentSurface = reinterpret_cast(GetProcAddress("eglGetCurrentSurface")); GetDisplay = reinterpret_cast(GetProcAddress("eglGetDisplay")); GetError = reinterpret_cast(GetProcAddress("eglGetError")); Initialize = reinterpret_cast(GetProcAddress("eglInitialize")); MakeCurrent = reinterpret_cast(GetProcAddress("eglMakeCurrent")); QueryString = reinterpret_cast(GetProcAddress("eglQueryString")); } } // namespace dawn::native::opengl