nxdk_pgraph_tests
A collection of tests for the Xbox nv2a graphics processor
 
Loading...
Searching...
No Matches
three_d_primitive_tests.h
1#ifndef NXDK_PGRAPH_TESTS_THREE_D_PRIMITIVE_TESTS_H
2#define NXDK_PGRAPH_TESTS_THREE_D_PRIMITIVE_TESTS_H
3
4#include <memory>
5#include <vector>
6
7#include "test_host.h"
8#include "test_suite.h"
9#include "vertex_buffer.h"
10
11class VertexBuffer;
12
17 public:
18 enum DrawMode {
19 DRAW_ARRAYS,
20 DRAW_INLINE_BUFFERS,
21 DRAW_INLINE_ARRAYS,
22 DRAW_INLINE_ELEMENTS,
23 };
24
25 public:
26 ThreeDPrimitiveTests(TestHost& host, std::string output_dir, const Config& config);
27 void Initialize() override;
28
29 private:
30 void CreateLines();
31
32 void CreateTriangles();
33 void CreateTriangleStrip();
34 void CreateTriangleFan();
35
36 void CreateQuads();
37 void CreateQuadStrip();
38
39 void CreatePolygon();
40
41 void Test(TestHost::DrawPrimitive primitive, DrawMode draw_mode, bool line_smooth, bool poly_smooth);
42
43 static std::string MakeTestName(TestHost::DrawPrimitive primitive, DrawMode draw_mode, bool line_smooth,
44 bool poly_smooth);
45
46 private:
47 std::vector<uint32_t> index_buffer_;
48
49 static constexpr const char* kSuiteName = "3D primitive";
50};
51
52#endif // NXDK_PGRAPH_TESTS_THREE_D_PRIMITIVE_TESTS_H
Definition test_host.h:47
DrawPrimitive
Enumerates the rendering primitives supported by the NV2A.
Definition test_host.h:71
Definition test_suite.h:20
Definition three_d_primitive_tests.h:16
void Initialize() override
Called to initialize the test suite.
Definition three_d_primitive_tests.cpp:667
Definition vertex_buffer.h:204
Runtime configuration for TestSuites.
Definition test_suite.h:23