LiteFX 0.3.1.2022
Computer Graphics Engine
graphics_formatters.hpp
1#pragma once
2
3#include "graphics_api.hpp"
4#include <fmt/format.h>
5
6using namespace LiteFX::Graphics;
7
8template <>
9struct LITEFX_GRAPHICS_API fmt::formatter<LiteFX::Graphics::PrimitiveTopology> : formatter<string_view> {
10 template <typename FormatContext>
11 auto format(LiteFX::Graphics::PrimitiveTopology t, FormatContext& ctx) {
12 string_view name = "Invalid";
13 switch (t) {
14 using enum PrimitiveTopology;
15 case PointList: name = "PointList"; break;
16 case LineList: name = "LineList"; break;
17 case TriangleList: name = "TriangleList"; break;
18 case LineStrip: name = "LineStrip"; break;
19 case TriangleStrip: name = "TriangleStrip"; break;
20 }
21 return formatter<string_view>::format(name, ctx);
22 }
23};
Definition: graphics.hpp:7
Definition: app_formatters.hpp:6
auto format(LiteFX::Graphics::PrimitiveTopology t, FormatContext &ctx)
Definition: graphics_formatters.hpp:11