From f083cacb259054ce996b70f8b9dc0d9eb0bdbfb8 Mon Sep 17 00:00:00 2001 From: omnisci3nce Date: Fri, 26 Jul 2024 16:37:53 +1000 Subject: wip egui --- src/new_render/skybox.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/new_render/skybox.c') diff --git a/src/new_render/skybox.c b/src/new_render/skybox.c index 882123d..8ba4da9 100644 --- a/src/new_render/skybox.c +++ b/src/new_render/skybox.c @@ -33,6 +33,10 @@ float skyboxVertices[] = { 1.0f, -1.0f, -1.0f, -1.0f, -1.0f, 1.0f, 1.0f, -1.0f, 1.0f }; +static const char* faces[6] = { "assets/demo/skybox/right.jpg", "assets/demo/skybox/left.jpg", + "assets/demo/skybox/top.jpg", "assets/demo/skybox/bottom.jpg", + "assets/demo/skybox/front.jpg", "assets/demo/skybox/back.jpg" }; + Skybox Skybox_Create(const char** face_paths, int n) { INFO("Creating a skybox"); assert(n == 6); // ! we're only supporting a full cubemap for now @@ -118,6 +122,10 @@ Skybox Skybox_Create(const char** face_paths, int n) { return (Skybox){ .cube = cube, .texture = handle, .pipeline = pipeline }; } +Skybox Skybox_Default() { + return Skybox_Create(faces, 6); +} + void Skybox_Draw(Skybox* skybox, Camera camera) { GPU_CmdEncoder* enc = GPU_GetDefaultEncoder(); glDepthFunc(GL_LEQUAL); -- cgit v1.2.3-70-g09d2