diff options
author | Tony Wasserka <NeoBrainX@gmail.com> | 2014-08-17 14:06:58 +0200 |
---|---|---|
committer | Tony Wasserka <NeoBrainX@gmail.com> | 2014-08-25 22:03:18 +0200 |
commit | 6ea003c7b5ec97d0a754197654cdf6e7fccdba24 (patch) | |
tree | b565322792f592bc2708a969cb395bc0679fe018 /src/video_core/debug_utils/debug_utils.h | |
parent | GSP: Update framebuffer information when necessary. (diff) | |
download | yuzu-6ea003c7b5ec97d0a754197654cdf6e7fccdba24.tar yuzu-6ea003c7b5ec97d0a754197654cdf6e7fccdba24.tar.gz yuzu-6ea003c7b5ec97d0a754197654cdf6e7fccdba24.tar.bz2 yuzu-6ea003c7b5ec97d0a754197654cdf6e7fccdba24.tar.lz yuzu-6ea003c7b5ec97d0a754197654cdf6e7fccdba24.tar.xz yuzu-6ea003c7b5ec97d0a754197654cdf6e7fccdba24.tar.zst yuzu-6ea003c7b5ec97d0a754197654cdf6e7fccdba24.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/debug_utils/debug_utils.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/video_core/debug_utils/debug_utils.h b/src/video_core/debug_utils/debug_utils.h new file mode 100644 index 000000000..9b4dce539 --- /dev/null +++ b/src/video_core/debug_utils/debug_utils.h @@ -0,0 +1,40 @@ +// Copyright 2014 Citra Emulator Project +// Licensed under GPLv2 +// Refer to the license.txt file included. + +#pragma once + +#include <array> +#include <vector> + +#include "video_core/pica.h" + +namespace Pica { + +namespace DebugUtils { + +using TriangleTopology = Regs::TriangleTopology; + +// Simple utility class for dumping geometry data to an OBJ file +class GeometryDumper { +public: + void AddVertex(std::array<float,3> pos, TriangleTopology topology); + + void Dump(); + +private: + struct Vertex { + std::array<float,3> pos; + }; + + struct Face { + int index[3]; + }; + + std::vector<Vertex> vertices; + std::vector<Face> faces; +}; + +} // namespace + +} // namespace |