nxdk_pgraph_tests
A collection of tests for the Xbox nv2a graphics processor
 
Loading...
Searching...
No Matches
lighting_normal_tests.h
1#ifndef NXDK_PGRAPH_TESTS_LIGHTING_NORMAL_TESTS_H
2#define NXDK_PGRAPH_TESTS_LIGHTING_NORMAL_TESTS_H
3
4#include <memory>
5#include <vector>
6
7#include "test_suite.h"
8
9class TestHost;
10namespace PBKitPlusPlus {
11class VertexBuffer;
12}
13
14using namespace PBKitPlusPlus;
15
22 public:
23 enum DrawMode {
24 DRAW_ARRAYS,
25 DRAW_INLINE_BUFFERS,
26 DRAW_INLINE_ARRAYS,
27 DRAW_INLINE_ELEMENTS,
28 };
29
30 public:
31 LightingNormalTests(TestHost& host, std::string output_dir, const Config& config);
32
33 void Initialize() override;
34 void Deinitialize() override;
35
36 private:
37 void CreateGeometry();
38 void Test(bool set_normal, const float* normal, DrawMode draw_mode);
39
40 static std::string MakeTestName(bool set_normal, const float* normal, DrawMode draw_mode);
41
42 private:
43 std::shared_ptr<VertexBuffer> normal_bleed_buffer_;
44 std::shared_ptr<VertexBuffer> lit_buffer_;
45
46 std::vector<uint32_t> lit_index_buffer_;
47};
48
49#endif // NXDK_PGRAPH_TESTS_LIGHTING_NORMAL_TESTS_H
Definition lighting_normal_tests.h:21
void Deinitialize() override
Called to tear down the test suite.
Definition lighting_normal_tests.cpp:88
void Initialize() override
Called to initialize the test suite.
Definition lighting_normal_tests.cpp:69
Definition test_host.h:33
Definition test_suite.h:20
Runtime configuration for TestSuites.
Definition test_suite.h:23