13#include <initializer_list>
213 this->profiling = profiling;
228 virtual const std::vector<Profiling::Event>&
GetTimeline()
const = 0;
239 bool profiling =
false;
A buffer containing GPU accessible data.
Definition: Buffer.hpp:8
BufferUsage
How the buffer is going to be used.
Definition: Buffer.hpp:11
A buffer into which rendering commands are recorded.
Definition: CommandBuffer.hpp:24
A compute pipeline.
Definition: ComputePipeline.hpp:11
Binds together a vertex description with buffers.
Definition: GeometryBinding.hpp:8
IndexType
The type of values in the index buffer.
Definition: GeometryBinding.hpp:11
A graphics pipeline.
Definition: GraphicsPipeline.hpp:11
Low level renderer abstracting the underlaying graphics API (OpenGL or Vulkan).
Definition: LowLevelRenderer.hpp:27
virtual ShaderProgram * CreateShaderProgram(std::initializer_list< const Shader * > shaders)=0
Create a shader program.
virtual CommandBuffer * CreateCommandBuffer()=0
Create a command buffer.
virtual const Sampler * GetSampler(Sampler::Filter filter, Sampler::Clamping clamping) const =0
Get a sampler.
virtual Texture * CreateTexture(const glm::uvec2 size, Texture::Format format, int components, unsigned char *data)=0
Create a texture.
bool IsProfiling() const
Get whether profiling is active.
Definition: LowLevelRenderer.hpp:220
virtual Buffer * CreateTemporaryBuffer(Buffer::BufferUsage bufferUsage, unsigned int size, const void *data=nullptr)=0
Create a temporary GPU buffer.
virtual ComputePipeline * CreateComputePipeline(const ShaderProgram *shaderProgram)=0
Create a compute pipeline.
virtual void Present()=0
Present the rendered image to the swap chain.
virtual void FreeRenderTarget(Texture *renderTarget)=0
Free a render target.
virtual Shader * CreateShader(const ShaderSource &shaderSource, Shader::Type type)=0
Create a shader.
virtual GraphicsPipeline * CreateGraphicsPipeline(const ShaderProgram *shaderProgram, const GraphicsPipeline::Configuration &configuration, const VertexDescription *vertexDescription=nullptr)=0
Create a graphics pipeline.
virtual ~LowLevelRenderer()
Destructor.
Definition: LowLevelRenderer.hpp:55
virtual const OptionalFeatures & GetOptionalFeatures() const =0
Get which optional features are supported.
virtual VertexDescription * CreateVertexDescription(unsigned int attributeCount, const VertexDescription::Attribute *attributes, bool indexBuffer=false)=0
Create a vertex description.
virtual void Submit(CommandBuffer *commandBuffer)=0
Submit a command buffer for execution.
virtual Buffer * CreateBuffer(Buffer::BufferUsage bufferUsage, unsigned int size, const void *data=nullptr)=0
Create a GPU buffer.
LowLevelRenderer()
Create a new low-level renderer.
Definition: LowLevelRenderer.hpp:52
virtual GeometryBinding * CreateGeometryBinding(const VertexDescription *vertexDescription, Buffer *vertexBuffer, GeometryBinding::IndexType indexType=GeometryBinding::IndexType::NONE, const Buffer *indexBuffer=nullptr)=0
Create a geometry binding.
virtual Texture * CreateRenderTarget(const glm::uvec2 &size, Texture::Format format)=0
Create a render target.
void SetProfiling(bool profiling)
Set whether to profile.
Definition: LowLevelRenderer.hpp:212
virtual unsigned char * ReadImage(Texture *texture)=0
Read a render texture color image.
virtual const std::vector< Profiling::Event > & GetTimeline() const =0
Get profiling timeline.
virtual void BeginFrame()=0
Begin a new frame.
virtual void Wait()=0
Wait for all rendering to finish.
Determines how a texture should be sampled.
Definition: Sampler.hpp:6
Filter
The interpolation to apply.
Definition: Sampler.hpp:9
Clamping
How to handle sampling outside the texture dimensions.
Definition: Sampler.hpp:16
Compiles and handles a shader. Shaders should be linked together into a ShaderProgram.
Definition: Shader.hpp:8
Type
The type of shader.
Definition: Shader.hpp:11
A shader program.
Definition: ShaderProgram.hpp:11
A texture.
Definition: Texture.hpp:8
Format
The format of the texture.
Definition: Texture.hpp:18
Describes how a vertex buffer is accessed by a shader.
Definition: VertexDescription.hpp:8
Definition: Editor.hpp:18
The configuration of the graphics pipeline.
Definition: GraphicsPipeline.hpp:14
Optional features.
Definition: LowLevelRenderer.hpp:30
bool wideLines
Whether wide lines are supported.
Definition: LowLevelRenderer.hpp:35
bool timestamps
Whether timestamps are supported.
Definition: LowLevelRenderer.hpp:38
bool fillModeNonSolid
Whether non-solid fill modes (point and line) are supported.
Definition: LowLevelRenderer.hpp:32
bool shaderAtomics
Definition: LowLevelRenderer.hpp:48
uint32_t attachmentlessMsaaSamples
Bitmask of the number of MSAA samples supported for attachmentless rendering.
Definition: LowLevelRenderer.hpp:44
bool conservativeRasterization
Whether conservative rasterization is supported.
Definition: LowLevelRenderer.hpp:41
Describes an attribute used in a vertex shader.
Definition: VertexDescription.hpp:18