more formats and math stuffs

This commit is contained in:
Greg Wells
2025-07-09 13:28:18 -04:00
parent 8b31d2e936
commit ef815541c7
2 changed files with 4 additions and 0 deletions

View File

@@ -3,12 +3,14 @@
typedef enum gnImageFormat { typedef enum gnImageFormat {
GN_FORMAT_NONE, GN_FORMAT_NONE,
GN_FORMAT_BGRA8_SRGB, GN_FORMAT_BGRA8_SRGB,
GN_FORMAT_BGRA8,
GN_FORMAT_RGBA8_SRGB, GN_FORMAT_RGBA8_SRGB,
GN_FORMAT_D24S8_UINT, GN_FORMAT_D24S8_UINT,
GN_FORMAT_D32S8_UINT, GN_FORMAT_D32S8_UINT,
} gnImageFormat; } gnImageFormat;
typedef enum gnColorSpace { typedef enum gnColorSpace {
GN_COLOR_SPACE_NONE,
GN_COLOR_SPACE_SRGB_NONLINEAR GN_COLOR_SPACE_SRGB_NONLINEAR
} gnColorSpace; } gnColorSpace;

View File

@@ -1,3 +1,5 @@
#pragma once #pragma once
#include <math.h>
static const inline float gnRadians(const float degrees) { return degrees * (3.14159265358979323846f / 180.0f); } static const inline float gnRadians(const float degrees) { return degrees * (3.14159265358979323846f / 180.0f); }
static const inline float gnRoot(const float input, const float n) { return pow(input, 1./n); }