mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
based on 'clgl-fork' branch from https://github.com/kallaballa/compute-runtime EGL headers taken from https://github.com/KhronosGroup/EGL-Registry revision: 57b4876de0f33677ece92dd9de0ef105ce69139d Related-To: NEO-3599 Fixes https://github.com/intel/compute-runtime/issues/166 Co-authored-by: Jacek Danecki <jacek.danecki@intel.com> Co-authored-by: Amir Hassan <amir@viel-zu.org> Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
29 lines
611 B
C++
29 lines
611 B
C++
/*
|
|
* Copyright (C) 2018-2023 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#pragma once
|
|
#include "shared/source/os_interface/os_library.h"
|
|
|
|
#include "GL/gl.h"
|
|
#include "gl_types.h"
|
|
|
|
namespace NEO {
|
|
class GlFunctionHelper {
|
|
public:
|
|
GlFunctionHelper(OsLibrary *glLibrary, const std::string &functionName) {
|
|
glFunctionPtr = (*glLibrary)[functionName];
|
|
}
|
|
|
|
ConvertibleProcAddr operator[](const char *name) {
|
|
return ConvertibleProcAddr{reinterpret_cast<void *>(glFunctionPtr(name))};
|
|
}
|
|
|
|
protected:
|
|
GLFunctionType glFunctionPtr = nullptr;
|
|
};
|
|
}; // namespace NEO
|