Add OpenGL renderer capability target
This commit is contained in:
26
src/renderer_gl/opengl_capabilities.h
Normal file
26
src/renderer_gl/opengl_capabilities.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
|
||||
#include <span>
|
||||
#include <string_view>
|
||||
|
||||
namespace pp::renderer::gl {
|
||||
|
||||
struct OpenGlRuntime {
|
||||
bool desktop_gl = false;
|
||||
bool gles = false;
|
||||
bool web = false;
|
||||
};
|
||||
|
||||
struct OpenGlCapabilities {
|
||||
bool framebuffer_fetch = false;
|
||||
bool map_buffer_alignment = false;
|
||||
bool float32_textures = false;
|
||||
bool float32_linear = false;
|
||||
bool float16_textures = false;
|
||||
};
|
||||
|
||||
[[nodiscard]] OpenGlCapabilities detect_opengl_capabilities(
|
||||
std::span<const std::string_view> extensions,
|
||||
OpenGlRuntime runtime) noexcept;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user