Just™ Game Engine
renderer_api.hpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2021-2022 Konstanty Misiak
3 *
4 * SPDX-License-Identifier: MIT
5 */
6
7#pragma once
8#include "jng/core/base.hpp"
9
11
12 enum class PrimitiveType {
13 Lines,
15 };
16
17 enum class IndexType {
18 U8,
19 U16,
20 U32
21 };
22
23 void setViewport(u32 x, u32 y, u32 width, u32 height);
24 void clear(const glm::vec3& color);
25 void draw(u32 count, PrimitiveType primitiveType = PrimitiveType::Triangles);
26 void drawIndexed(u32 count, IndexType indexType, PrimitiveType primitiveType = PrimitiveType::Triangles);
27
28} // namespace jng::RendererAPI
Definition: renderer_api.hpp:10
void drawIndexed(u32 count, IndexType indexType, PrimitiveType primitiveType=PrimitiveType::Triangles)
Definition: renderer_api_ogl.cpp:57
void setViewport(u32 x, u32 y, u32 width, u32 height)
Definition: renderer_api_ogl.cpp:41
PrimitiveType
Definition: renderer_api.hpp:12
IndexType
Definition: renderer_api.hpp:17
void clear(const glm::vec3 &color)
Definition: renderer_api_ogl.cpp:46
void draw(u32 count, PrimitiveType primitiveType=PrimitiveType::Triangles)
Definition: renderer_api_ogl.cpp:52
uint32_t u32
Definition: base.hpp:41