Move Windows GL info mapping to renderer gl

This commit is contained in:
2026-06-02 08:54:51 +02:00
parent a12a3454c4
commit f968488e34
3 changed files with 12 additions and 5 deletions

View File

@@ -196,6 +196,9 @@ Known local toolchain state:
longer expose raw OpenGL enum defaults; default texture formats, sampler
filters/wraps, and render-target formats resolve through backend-owned
overloads.
The Windows entrypoint also consumes backend-owned generic OpenGL error-code
and info-string tokens; WGL context/pixel-format constants remain in the
platform shell for a later platform-boundary slice.
- `windows-msvc-vcpkg-headless` validates manifest install/configure/build/test
for the current headless component matrix; see DEBT-0007 for remaining app
and platform triplet migration.

View File

@@ -463,6 +463,9 @@ Legacy `Texture2D`, `TextureManager`, `Sampler`, and `RTT` public headers no
longer expose raw OpenGL enum defaults; default texture formats, sampler
filters/wraps, and render-target formats are resolved through backend-owned
overloads.
The Windows entrypoint now delegates generic OpenGL error-code and info-string
tokens to `pp_renderer_gl`; WGL context/pixel-format constants remain in the
platform shell for a later platform-boundary slice.
The existing renderer classes are not yet fully
behind the renderer interfaces.

View File

@@ -8,6 +8,7 @@
#include "canvas.h"
#include "keymap.h"
#include "hmd.h"
#include "renderer_gl/opengl_capabilities.h"
#include "../resource.h"
#include <shellscalingapi.h>
@@ -828,7 +829,7 @@ void _post_call_callback(const char* name, void* funcptr, int len_args, ...)
GLenum error_code;
error_code = glad_glGetError();
if (error_code != GL_NO_ERROR)
if (error_code != pp::renderer::gl::no_error_code())
{
LOG("ERROR %d in %s\n", error_code, name);
}
@@ -958,9 +959,9 @@ int main(int argc, char** argv)
return 0;
}
LOG("GL version: %s", glGetString(GL_VERSION));
LOG("GL vendor: %s", glGetString(GL_VENDOR));
LOG("GL renderer: %s", glGetString(GL_RENDERER));
LOG("GL version: %s", glGetString(static_cast<GLenum>(pp::renderer::gl::version_string_name())));
LOG("GL vendor: %s", glGetString(static_cast<GLenum>(pp::renderer::gl::vendor_string_name())));
LOG("GL renderer: %s", glGetString(static_cast<GLenum>(pp::renderer::gl::renderer_string_name())));
#ifdef USE_RENDERDOC
if (!win32_renderdoc_init())
@@ -968,7 +969,7 @@ int main(int argc, char** argv)
#endif // USE_RENDERDOC
swprintf_s(window_title, L"PanoPainter %s (%s)", g_version_number_w,
str2wstr((char*)glGetString(GL_RENDERER)).c_str());
str2wstr((char*)glGetString(static_cast<GLenum>(pp::renderer::gl::renderer_string_name()))).c_str());
// If supported create a 3.3 context
if (GLAD_WGL_ARB_create_context)