diff options
| author | nathan <nathansmith@disroot.org> | 2025-12-27 20:23:04 +0000 |
|---|---|---|
| committer | nathan <nathansmith@disroot.org> | 2025-12-27 20:23:04 +0000 |
| commit | c6096a028d57da1026aa86ac215ea2f07461cd96 (patch) | |
| tree | 46341ba8ac0697a696feb6890010212393331036 /src/utils.c | |
| parent | 525b9023b83014c46a4a21ec9a729b559d6be0b3 (diff) | |
| download | FindThings-c6096a028d57da1026aa86ac215ea2f07461cd96.tar.gz FindThings-c6096a028d57da1026aa86ac215ea2f07461cd96.tar.bz2 FindThings-c6096a028d57da1026aa86ac215ea2f07461cd96.zip | |
cubemap thingy working
Diffstat (limited to 'src/utils.c')
| -rw-r--r-- | src/utils.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/src/utils.c b/src/utils.c index 063fe47..02d7388 100644 --- a/src/utils.c +++ b/src/utils.c @@ -34,36 +34,4 @@ Vector3 randomDirection3(int seed, int* nextSeed) return Vector3Normalize(direction); } -Image generateCubemapImage(const bool** cubemap, int width, int height) -{ - // Allocate pixel data. - Image image = (Image){ - .data = FT_CALLOC(width * height, sizeof(Color)), - .width = width, - .height = height, - .format = PIXELFORMAT_UNCOMPRESSED_R8G8B8A8, - .mipmaps = 1 - }; - - if (image.data == NULL) - { - ALLOCATION_ERROR; - return image; - } - - // Convert cubemap to image data. - int index = 0; - - for (int y = 0; y < height; ++y) - { - for (int x = 0; x < width; ++x) - { - ((Color*)image.data)[index] = cubemap[y][x] ? BLACK : WHITE; - ++index; - } - } - - return image; -} - // Why does the universe feel strange to exist in? |
