[RTEXTURES] Remove the panorama cubemap layout option (#4425)

* Remove the panorama cubemap layout, it was not implemented.
Left a todo in the code for some aspiring developer to finish.

* Update raylib_api.* by CI

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Jeffery Myers
2024-10-24 00:06:24 -07:00
committed by GitHub
parent eb04154c98
commit 0b650f62a6
6 changed files with 6 additions and 21 deletions

View File

@@ -4100,7 +4100,6 @@ TextureCubemap LoadTextureCubemap(Image image, int layout)
{
if ((image.width/6) == image.height) { layout = CUBEMAP_LAYOUT_LINE_HORIZONTAL; cubemap.width = image.width/6; }
else if ((image.width/4) == (image.height/3)) { layout = CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE; cubemap.width = image.width/4; }
else if (image.width >= (int)((float)image.height*1.85f)) { layout = CUBEMAP_LAYOUT_PANORAMA; cubemap.width = image.width/4; }
}
else if (image.height > image.width)
{
@@ -4114,7 +4113,6 @@ TextureCubemap LoadTextureCubemap(Image image, int layout)
if (layout == CUBEMAP_LAYOUT_LINE_HORIZONTAL) cubemap.width = image.width/6;
if (layout == CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR) cubemap.width = image.width/3;
if (layout == CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE) cubemap.width = image.width/4;
if (layout == CUBEMAP_LAYOUT_PANORAMA) cubemap.width = image.width/4;
}
cubemap.height = cubemap.width;
@@ -4133,11 +4131,11 @@ TextureCubemap LoadTextureCubemap(Image image, int layout)
{
faces = ImageCopy(image); // Image data already follows expected convention
}
else if (layout == CUBEMAP_LAYOUT_PANORAMA)
/*else if (layout == CUBEMAP_LAYOUT_PANORAMA)
{
// TODO: Convert panorama image to square faces...
// TODO: implement panorama by converting image to square faces...
// Ref: https://github.com/denivip/panorama/blob/master/panorama.cpp
}
} */
else
{
if (layout == CUBEMAP_LAYOUT_LINE_HORIZONTAL) for (int i = 0; i < 6; i++) faceRecs[i].x = (float)size*i;