2018-09-25 15:19:30 +08:00
|
|
|
/*
|
2020-02-22 16:28:27 +08:00
|
|
|
* Copyright (C) 2018-2020 Intel Corporation
|
2018-09-25 15:19:30 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2020-02-24 05:44:01 +08:00
|
|
|
#include "shared/source/os_interface/os_library.h"
|
2019-02-27 18:39:32 +08:00
|
|
|
|
2018-09-25 15:19:30 +08:00
|
|
|
#include "GL/gl.h"
|
|
|
|
|
|
|
|
namespace Os {
|
|
|
|
extern const char *openglDllName;
|
|
|
|
}
|
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
namespace NEO {
|
2018-09-25 15:19:30 +08:00
|
|
|
class glFunctionHelper {
|
|
|
|
public:
|
|
|
|
glFunctionHelper::glFunctionHelper(OsLibrary *glLibrary, const std::string &functionName) {
|
|
|
|
glFunctionPtr = (*glLibrary)[functionName];
|
|
|
|
}
|
|
|
|
|
|
|
|
ConvertibleProcAddr operator[](const char *name) {
|
|
|
|
return ConvertibleProcAddr{glFunctionPtr(name)};
|
|
|
|
}
|
|
|
|
|
|
|
|
protected:
|
|
|
|
// clang-format off
|
|
|
|
PROC(__stdcall *glFunctionPtr)(LPCSTR Arg1) = nullptr;
|
|
|
|
// clang-format on
|
|
|
|
};
|
2019-03-26 18:59:46 +08:00
|
|
|
}; // namespace NEO
|