diff options
author | omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-08-11 00:13:18 +1000 |
---|---|---|
committer | omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-08-11 00:13:18 +1000 |
commit | 87a47aead498d4f7c360d64efc632bcf1a533751 (patch) | |
tree | 7b39d6abcd6d39d76ecaacc0352ad685783a00c7 /src/render/skybox.c | |
parent | 7bd1560cf2b49018a842fb42cda2c17b347957aa (diff) |
chore: fmt and lint
Diffstat (limited to 'src/render/skybox.c')
-rw-r--r-- | src/render/skybox.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/render/skybox.c b/src/render/skybox.c index cc5797f..b228c82 100644 --- a/src/render/skybox.c +++ b/src/render/skybox.c @@ -39,7 +39,9 @@ static const char* faces[6] = { "assets/demo/skybox/right.jpg", "assets/demo/sky 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 + CASSERT_MSG( + n == 6, + "We only support full cubemaps for now"); // ! we're only supporting a full cubemap for now // -- cube verts Geometry geom = { .format = VERTEX_POS_ONLY, // doesnt matter @@ -59,12 +61,8 @@ Skybox Skybox_Create(const char** face_paths, int n) { GPU_Texture* tex = GPU_TextureAlloc(&handle); glBindTexture(GL_TEXTURE_CUBE_MAP, tex->id); - int width, height, nrChannels; - // unsigned char *data; for (unsigned int i = 0; i < n; i++) { - TextureData data = TextureDataLoad( - face_paths[i], - false); // stbi_load(textures_faces[i].c_str(), &width, &height, &nrChannels, 0); + TextureData data = TextureDataLoad(face_paths[i], false); assert(data.description.format == TEXTURE_FORMAT_8_8_8_RGB_UNORM); glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, GL_RGB, data.description.extents.x, data.description.extents.y, 0, GL_RGB, GL_UNSIGNED_BYTE, data.image_data); @@ -91,10 +89,6 @@ Skybox Skybox_Create(const char** face_paths, int n) { ERROR_EXIT("Failed to load shaders from disk") } - // VertexDescription pos_only = { .debug_label = "Position only verts" }; - // VertexDesc_AddAttr(&pos_only, "inPos", ATTR_F32x3); - // pos_only.use_full_vertex_size = true; - ShaderDataLayout camera_data = Binding_Camera_GetLayout(NULL); ShaderDataLayout shader_data = Skybox_GetLayout(NULL); |