23 void setViewport(uint32 xPx, uint32 yPx, uint32 widthPx, uint32 heightPx)
override
40 TSpanView<std::byte> pixelData,
49 const math::Vector2UI& regionOriginPx,
50 const math::Vector2UI& regionSizePx,
51 TSpanView<std::byte> pixelData,
72 std::string shaderSource)
override
86 std::size_t numVertices,
94 std::size_t numIndices,
102 TSpanView<std::shared_ptr<VertexStorage>> vertexStorages,
103 const std::shared_ptr<IndexStorage>& indexStorage)
override
109 void beginRawCommand()
override
112 void endRawCommand()
override
Graphics API abstraction.
Definition GHI.h:35
void setViewport(uint32 xPx, uint32 yPx, uint32 widthPx, uint32 heightPx) override
Set how NDC corresponds to pixels on the display.
Definition NullGHI.h:23
TextureNativeHandle tryGetTextureNativeHandle(TextureHandle handle) override
Definition NullGHI.h:58
void clearBuffer(EClearTarget targets) override
Definition NullGHI.h:26
void swapBuffers() override
Definition NullGHI.h:35
std::shared_ptr< IndexStorage > createIndexStorage(EStorageElement indexType, std::size_t numIndices, EStorageUsage usage) override
Definition NullGHI.h:92
void draw(Mesh &mesh, EMeshDrawMode drawMode) override
Definition NullGHI.h:32
bool tryUploadPixelDataTo2DRegion(TextureHandle handle, const math::Vector2UI ®ionOriginPx, const math::Vector2UI ®ionSizePx, TSpanView< std::byte > pixelData, EPixelFormat pixelFormat, EPixelComponent pixelComponent) override
Definition NullGHI.h:47
std::shared_ptr< ShaderProgram > createShaderProgram(std::string name, const ShaderSetInfo &shaders) override
Definition NullGHI.h:77
~NullGHI() override=default
void load() override
Load and initiate the GHI. load() and unload() must be called on the same thread. All remaining metho...
Definition NullGHI.h:17
void setClearColor(const math::Vector4F &color) override
Definition NullGHI.h:29
std::shared_ptr< Mesh > createMesh(const MeshVertexLayoutInfo &layout, TSpanView< std::shared_ptr< VertexStorage > > vertexStorages, const std::shared_ptr< IndexStorage > &indexStorage) override
Definition NullGHI.h:100
std::shared_ptr< VertexStorage > createVertexStorage(const VertexGroupFormatInfo &format, std::size_t numVertices, EStorageUsage usage) override
Definition NullGHI.h:84
std::shared_ptr< Shader > createShader(std::string name, EShadingStage shadingStage, std::string shaderSource) override
Definition NullGHI.h:69
void unload() override
Unload and clean up the GHI. Must be called on the same thread as load(). See load() for more informa...
Definition NullGHI.h:20
NullGHI()
Definition NullGHI.h:11
void attachTextureToFramebuffer(uint32 attachmentIdx, TextureHandle textureHandle, FramebufferHandle framebufferHandle) override
Definition NullGHI.h:63
bool tryUploadPixelData(TextureHandle handle, TSpanView< std::byte > pixelData, EPixelFormat pixelFormat, EPixelComponent pixelComponent) override
Try to upload pixel data to a texture.
Definition NullGHI.h:38
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
EGraphicsAPI
Definition EGraphicsAPI.h:7
EPixelComponent
Definition ghi_enums.h:42