7#include <Common/config.h>
25 void setViewport(uint32 xPx, uint32 yPx, uint32 widthPx, uint32 heightPx)
override;
33 TSpanView<std::byte> pixelData,
39 const math::Vector2UI& regionOriginPx,
40 const math::Vector2UI& regionSizePx,
41 TSpanView<std::byte> pixelData,
55 std::string shaderSource)
override;
63 std::size_t numVertices,
68 std::size_t numIndices,
73 TSpanView<std::shared_ptr<VertexStorage>> vertexStorages,
74 const std::shared_ptr<IndexStorage>& indexStorage)
override;
79 void beginRawCommand()
override;
80 void endRawCommand()
override;
84 GLFWwindow* m_glfwWindow;
85 bool m_hasDebugContext;
88 std::thread::id m_loadThreadId;
90 std::unique_ptr<DeviceCapabilityInfo> m_deviceCapability;
Definition ghi_infos.h:88
Graphics API abstraction.
Definition GHI.h:35
Definition OpenglContext.h:14
Definition OpenglGHI.h:18
std::shared_ptr< ShaderProgram > createShaderProgram(std::string name, const ShaderSetInfo &shaders) override
Definition OpenglGHI.cpp:390
std::shared_ptr< IndexStorage > createIndexStorage(EStorageElement indexType, std::size_t numIndices, EStorageUsage usage) override
Definition OpenglGHI.cpp:421
OpenglGHI(OpenglContext &ctx, GLFWwindow *glfwWindow, bool hasDebugContext)
Definition OpenglGHI.cpp:152
std::shared_ptr< Mesh > createMesh(const MeshVertexLayoutInfo &layout, TSpanView< std::shared_ptr< VertexStorage > > vertexStorages, const std::shared_ptr< IndexStorage > &indexStorage) override
Definition OpenglGHI.cpp:432
bool tryUploadPixelData(TextureHandle handle, TSpanView< std::byte > pixelData, EPixelFormat pixelFormat, EPixelComponent pixelComponent) override
Try to upload pixel data to a texture.
Definition OpenglGHI.cpp:305
void setViewport(uint32 xPx, uint32 yPx, uint32 widthPx, uint32 heightPx) override
Set how NDC corresponds to pixels on the display.
Definition OpenglGHI.cpp:229
void clearBuffer(EClearTarget targets) override
Definition OpenglGHI.cpp:238
void setClearColor(const math::Vector4F &color) override
Definition OpenglGHI.cpp:262
DeviceCapabilityInfo getDeviceCapabilities() override
Definition OpenglGHI.cpp:443
void unload() override
Unload and clean up the GHI. Must be called on the same thread as load(). See load() for more informa...
Definition OpenglGHI.cpp:217
void load() override
Load and initiate the GHI. load() and unload() must be called on the same thread. All remaining metho...
Definition OpenglGHI.cpp:171
TextureNativeHandle tryGetTextureNativeHandle(TextureHandle handle) override
Definition OpenglGHI.cpp:339
void attachTextureToFramebuffer(uint32 attachmentIdx, TextureHandle textureHandle, FramebufferHandle framebufferHandle) override
Definition OpenglGHI.cpp:350
std::shared_ptr< Shader > createShader(std::string name, EShadingStage shadingStage, std::string shaderSource) override
Definition OpenglGHI.cpp:379
~OpenglGHI() override
Definition OpenglGHI.cpp:166
void draw(Mesh &mesh, EMeshDrawMode drawMode) override
Definition OpenglGHI.cpp:271
void swapBuffers() override
Definition OpenglGHI.cpp:300
std::shared_ptr< VertexStorage > createVertexStorage(const VertexGroupFormatInfo &format, std::size_t numVertices, EStorageUsage usage) override
Definition OpenglGHI.cpp:410
bool tryUploadPixelDataTo2DRegion(TextureHandle handle, const math::Vector2UI ®ionOriginPx, const math::Vector2UI ®ionSizePx, TSpanView< std::byte > pixelData, EPixelFormat pixelFormat, EPixelComponent pixelComponent) override
Definition OpenglGHI.cpp:321
Definition ghi_infos.h:46
Definition PlatformDisplay.h:13
EPixelFormat
Definition ghi_enums.h:31
std::variant< std::monostate, uint64 > TextureNativeHandle
Definition ghi_fwd.h:52
EStorageElement
Definition ghi_enums.h:70
EClearTarget
Definition EClearTarget.h:11
EShadingStage
Definition ghi_enums.h:104
EStorageUsage
Definition ghi_enums.h:86
EMeshDrawMode
Definition ghi_enums.h:93
EPixelComponent
Definition ghi_enums.h:42