diff options
author | omnisci3nce <omniscient.oce@gmail.com> | 2024-07-18 13:38:27 +1000 |
---|---|---|
committer | omnisci3nce <omniscient.oce@gmail.com> | 2024-07-18 13:38:27 +1000 |
commit | c43bee3ec89e0863b4195ca9298a007d3526a6d9 (patch) | |
tree | 15998b606cc1b86d975f200ce09069bafd10d868 /src/new_render/skybox.h | |
parent | b872bd904f31dd90757a02e1bdda5598193c7bcc (diff) |
getting skybox ready
Diffstat (limited to 'src/new_render/skybox.h')
-rw-r--r-- | src/new_render/skybox.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/new_render/skybox.h b/src/new_render/skybox.h index ec06658..5540381 100644 --- a/src/new_render/skybox.h +++ b/src/new_render/skybox.h @@ -3,22 +3,23 @@ */ #pragma once -#include "backend_opengl.h" +#include "camera.h" #include "defines.h" #include "ral_types.h" +#include "render_types.h" typedef struct Skybox { - BufferHandle vertex_buffer; + Mesh cube; 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); +PUB void Skybox_Draw(Skybox* skybox, Camera camera); typedef struct SkyboxUniforms { - Vec3 in_pos; + Vec3 in_position; TextureHandle cubemap; } SkyboxUniforms; @@ -40,7 +41,7 @@ static ShaderDataLayout Skybox_GetLayout(void* data) { }; if (has_data) { - b1.data.bytes.data = &d->in_pos; + b1.data.bytes.data = &d->in_position; b2.data.texture.handle = d->cubemap; } return (ShaderDataLayout) { |