Move OpenGL extension query into renderer backend
This commit is contained in:
@@ -5,7 +5,9 @@
|
||||
#include <array>
|
||||
#include <cstdint>
|
||||
#include <span>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
namespace pp::renderer::gl {
|
||||
|
||||
@@ -459,11 +461,17 @@ struct OpenGlRuntimeInfo {
|
||||
};
|
||||
|
||||
using OpenGlStringQueryFn = const char* (*)(std::uint32_t name) noexcept;
|
||||
using OpenGlIndexedStringQueryFn = const char* (*)(std::uint32_t name, std::uint32_t index) noexcept;
|
||||
|
||||
struct OpenGlRuntimeInfoDispatch {
|
||||
OpenGlStringQueryFn get_string = nullptr;
|
||||
};
|
||||
|
||||
struct OpenGlExtensionQueryDispatch {
|
||||
OpenGlGetIntegerFn get_integer = nullptr;
|
||||
OpenGlIndexedStringQueryFn get_string_indexed = nullptr;
|
||||
};
|
||||
|
||||
struct OpenGlDefaultClear {
|
||||
std::array<float, 4> color {};
|
||||
std::uint32_t mask = 0;
|
||||
@@ -690,6 +698,8 @@ struct OpenGlMeshDeleteDispatch {
|
||||
OpenGlStateRestoreDispatch dispatch) noexcept;
|
||||
[[nodiscard]] pp::foundation::Result<OpenGlRuntimeInfo> query_opengl_runtime_info(
|
||||
OpenGlRuntimeInfoDispatch dispatch) noexcept;
|
||||
[[nodiscard]] pp::foundation::Result<std::vector<std::string>> query_opengl_extensions(
|
||||
OpenGlExtensionQueryDispatch dispatch);
|
||||
[[nodiscard]] OpenGlDefaultClear panopainter_default_clear() noexcept;
|
||||
[[nodiscard]] pp::foundation::Status clear_panopainter_default_target(OpenGlClearDispatch dispatch) noexcept;
|
||||
[[nodiscard]] pp::foundation::Status apply_opengl_viewport(
|
||||
|
||||
Reference in New Issue
Block a user