nxdk_pgraph_tests
A collection of tests for the Xbox nv2a graphics processor
 
Loading...
Searching...
No Matches
texture_generator.h
1#ifndef NXDK_PGRAPH_TESTS_TEXTURE_GENERATOR_H
2#define NXDK_PGRAPH_TESTS_TEXTURE_GENERATOR_H
3
4#include <SDL.h>
5
6#include <cstdint>
7
8// Inserts a rectangular checkerboard pattern into the given 32bpp texture buffer.
9void GenerateRGBACheckerboard(void *buffer, uint32_t x_offset, uint32_t y_offset, uint32_t width, uint32_t height,
10 uint32_t pitch, uint32_t first_color = 0xFF00FFFF, uint32_t second_color = 0xFF000000,
11 uint32_t checker_size = 8);
12
13void GenerateColoredCheckerboard(void *buffer, uint32_t x_offset, uint32_t y_offset, uint32_t width, uint32_t height,
14 uint32_t pitch, const uint32_t *colors, uint32_t num_colors,
15 uint32_t checker_size = 8);
16
17void GenerateSwizzledRGBACheckerboard(void *buffer, uint32_t x_offset, uint32_t y_offset, uint32_t width,
18 uint32_t height, uint32_t pitch, uint32_t first_color = 0xFF00FFFF,
19 uint32_t second_color = 0xFF000000, uint32_t checker_size = 8);
20
22void GenerateRGBTestPattern(void *target, uint32_t width, uint32_t height, uint8_t alpha = 0xFF);
23
25void GenerateRGBATestPattern(void *target, uint32_t width, uint32_t height);
26
28void GenerateRGBRadialATestPattern(void *target, uint32_t width, uint32_t height);
29
30int GenerateSurface(SDL_Surface **surface, int width, int height);
31int GenerateCheckerboardSurface(SDL_Surface **surface, int width, int height, uint32_t first_color = 0xFF00FFFF,
32 uint32_t second_color = 0xFF000000, uint32_t checker_size = 8);
33int GenerateColoredCheckerboardSurface(SDL_Surface **surface, int width, int height, uint32_t checker_size = 4);
34#endif // NXDK_PGRAPH_TESTS_TEXTURE_GENERATOR_H