diff options
Diffstat (limited to 'src/new_render/skybox.c')
-rw-r--r-- | src/new_render/skybox.c | 8 |
1 files changed, 8 insertions, 0 deletions
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); |