Share retained runtime GL dispatch
This commit is contained in:
10
src/main.cpp
10
src/main.cpp
@@ -8,6 +8,7 @@
|
||||
#include "canvas.h"
|
||||
#include "keymap.h"
|
||||
#include "hmd.h"
|
||||
#include "legacy_gl_runtime_dispatch.h"
|
||||
#include "renderer_gl/opengl_capabilities.h"
|
||||
#include "platform_windows/windows_platform_services.h"
|
||||
#include "../resource.h"
|
||||
@@ -89,11 +90,6 @@ void win32_renderdoc_frame_start() { }
|
||||
void win32_renderdoc_frame_end() { }
|
||||
#endif
|
||||
|
||||
const char* query_opengl_string(std::uint32_t name) noexcept
|
||||
{
|
||||
return reinterpret_cast<const char*>(glGetString(static_cast<GLenum>(name)));
|
||||
}
|
||||
|
||||
HRESULT(*GetDpiForMonitor_fn)(HMONITOR hmonitor, MONITOR_DPI_TYPE dpiType, UINT* dpiX, UINT* dpiY);
|
||||
HRESULT(*SetProcessDpiAwareness_fn)(PROCESS_DPI_AWARENESS value);
|
||||
void init_shcore_API()
|
||||
@@ -860,9 +856,7 @@ int main(int argc, char** argv)
|
||||
|
||||
auto runtime_info = pp::renderer::gl::OpenGlRuntimeInfo {};
|
||||
const auto runtime_info_result = pp::renderer::gl::query_opengl_runtime_info(
|
||||
pp::renderer::gl::OpenGlRuntimeInfoDispatch {
|
||||
.get_string = query_opengl_string,
|
||||
});
|
||||
pp::legacy::gl_runtime::runtime_info_dispatch());
|
||||
if (runtime_info_result.ok()) {
|
||||
runtime_info = runtime_info_result.value();
|
||||
LOG("GL version: %s", runtime_info.version);
|
||||
|
||||
Reference in New Issue
Block a user