mirror of
https://github.com/raysan5/raylib.git
synced 2025-10-03 16:36:26 +00:00
[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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user