Files
compute-runtime/opencl/source/helpers/gl_helper.h
Mateusz Jablonski 4919c7c9fb feature: add experimental support for cl-gl sharing on Linux
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>
2023-03-20 12:49:52 +01:00

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