summaryrefslogtreecommitdiff
path: root/src/new_render/skybox.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/new_render/skybox.h')
-rw-r--r--src/new_render/skybox.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/new_render/skybox.h b/src/new_render/skybox.h
index 10ec4f9..9bdc2ec 100644
--- a/src/new_render/skybox.h
+++ b/src/new_render/skybox.h
@@ -3,4 +3,30 @@
*/
#pragma once
+#include "backend_opengl.h"
#include "defines.h"
+#include "ral_types.h"
+
+typedef struct CubeMapData {
+ void* top_image_data;
+ void* bottom_image_data;
+ void* left_image_data;
+ void* right_image_data;
+ void* front_image_data;
+ void* back_image_data;
+ u32 width, height, num_channels;
+} CubeMapData;
+
+PUB void CubeMapData_Load(const char** face_paths, int n); // should always pass n = 6 for now
+PUB void CubeMapData_Free(CubeMapData* cubemap); // Frees all the image data for a cubemap
+PUB TextureHandle CubeMapData_Upload(CubeMapData* cubemap);
+
+typedef struct Skybox {
+ BufferHandle vertex_buffer;
+ TextureHandle texture;
+ GPU_Pipeline* pipeline; // "shader"
+} Skybox;
+
+PUB Skybox Skybox_Create(const char** face_paths, int n); // should always pass n = 6 for now
+
+PUB void Skybox_Draw(Skybox* skybox);