engine/include/gfx.hpp

65 lines
815 B
C++
Raw Normal View History

2022-09-07 09:02:01 +00:00
#pragma once
#include <cstdint>
2022-10-22 12:15:25 +00:00
#include <vector>
2022-09-07 09:02:01 +00:00
2022-10-22 12:15:25 +00:00
namespace engine::gfx {
2022-09-07 09:02:01 +00:00
enum class ShaderType {
VERTEX,
FRAGMENT,
};
enum class BufferType {
VERTEX,
INDEX,
UNIFORM,
2022-09-07 09:02:01 +00:00
};
enum class Primitive {
POINTS,
LINES,
LINE_STRIP,
TRIANGLES,
TRIANGLE_STRIP,
};
2022-10-22 12:15:25 +00:00
enum class VertexAttribFormat {
2023-01-20 16:30:35 +00:00
FLOAT2,
FLOAT3,
FLOAT4
2022-09-07 09:02:01 +00:00
};
2022-11-15 13:59:43 +00:00
enum class TextureFilter {
LINEAR,
NEAREST,
};
2023-01-26 21:17:07 +00:00
enum class MipmapSetting {
OFF,
NEAREST,
LINEAR,
};
2022-10-22 12:15:25 +00:00
struct VertexBufferDesc {
uint64_t size;
};
struct VertexAttribDescription {
uint32_t location;
VertexAttribFormat format;
uint32_t offset;
};
struct VertexFormat {
uint32_t stride;
std::vector<VertexAttribDescription> attributeDescriptions;
};
// handles (incomplete types)
2022-10-23 23:19:07 +00:00
struct Pipeline;
2022-10-24 00:10:48 +00:00
struct Buffer;
struct Texture;
2022-10-22 12:15:25 +00:00
2022-09-07 09:02:01 +00:00
}