From 663821b00ca8440509e0bc6d5022c809c7fe1cff Mon Sep 17 00:00:00 2001 From: LaG1924 Date: Mon, 15 Nov 2021 12:55:20 +0500 Subject: Changed section rendering to Gal --- src/Gal.hpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/Gal.hpp') diff --git a/src/Gal.hpp b/src/Gal.hpp index 06850ea..8089fd3 100644 --- a/src/Gal.hpp +++ b/src/Gal.hpp @@ -77,9 +77,17 @@ namespace Gal { Clamp, }; + enum class Primitive { + Triangle, + TriangleStrip, + TriangleFan, + }; + struct VertexAttribute { std::string name; Type type; + size_t count = 1; + size_t instances = 0; }; Impl* GetImplementation(); @@ -165,6 +173,8 @@ namespace Gal { virtual void SetTarget(std::shared_ptr target) = 0; + virtual void SetPrimitive(Primitive primitive) = 0; + virtual std::shared_ptr BindVertexBuffer(std::vector &&bufferLayout) = 0; virtual std::shared_ptr BindIndexBuffer() = 0; @@ -212,6 +222,8 @@ namespace Gal { virtual void Activate() = 0; virtual void Render(size_t offset = 0, size_t count = -1) = 0; + + virtual void SetInstancesCount(size_t count) = 0; }; struct Framebuffer { -- cgit v1.2.3