Browse Source

Corrected issue with enums renamed

pull/1632/head
Ray 3 years ago
parent
commit
c938d71d15
1 changed files with 13 additions and 13 deletions
  1. +13
    -13
      src/textures.c

+ 13
- 13
src/textures.c View File

@ -2754,14 +2754,14 @@ TextureCubemap LoadTextureCubemap(Image image, int layoutType)
// Check image width/height to determine the type of cubemap provided
if (image.width > image.height)
{
if ((image.width/6) == image.height) { layoutType = CUBEMAP_LINE_HORIZONTAL; cubemap.width = image.width/6; }
else if ((image.width/4) == (image.height/3)) { layoutType = CUBEMAP_CROSS_FOUR_BY_THREE; cubemap.width = image.width/4; }
else if (image.width >= (int)((float)image.height*1.85f)) { layoutType = CUBEMAP_PANORAMA; cubemap.width = image.width/4; }
if ((image.width/6) == image.height) { layoutType = CUBEMAP_LAYOUT_LINE_HORIZONTAL; cubemap.width = image.width/6; }
else if ((image.width/4) == (image.height/3)) { layoutType = CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE; cubemap.width = image.width/4; }
else if (image.width >= (int)((float)image.height*1.85f)) { layoutType = CUBEMAP_LAYOUT_PANORAMA; cubemap.width = image.width/4; }
}
else if (image.height > image.width)
{
if ((image.height/6) == image.width) { layoutType = CUBEMAP_LINE_VERTICAL; cubemap.width = image.height/6; }
else if ((image.width/3) == (image.height/4)) { layoutType = CUBEMAP_CROSS_THREE_BY_FOUR; cubemap.width = image.width/3; }
if ((image.height/6) == image.width) { layoutType = CUBEMAP_LAYOUT_LINE_VERTICAL; cubemap.width = image.height/6; }
else if ((image.width/3) == (image.height/4)) { layoutType = CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR; cubemap.width = image.width/3; }
}
cubemap.height = cubemap.width;
@ -3035,23 +3035,23 @@ void SetTextureWrap(Texture2D texture, int wrapMode)
{
case TEXTURE_WRAP_REPEAT:
{
rlTextureParameters(texture.id, RL_TEXTURE_TEXTURE_WRAP_S, RL_TEXTURE_WRAP_REPEAT);
rlTextureParameters(texture.id, RL_TEXTURE_TEXTURE_WRAP_T, RL_TEXTURE_WRAP_REPEAT);
rlTextureParameters(texture.id, RL_TEXTURE_WRAP_S, RL_TEXTURE_WRAP_REPEAT);
rlTextureParameters(texture.id, RL_TEXTURE_WRAP_T, RL_TEXTURE_WRAP_REPEAT);
} break;
case TEXTURE_WRAP_CLAMP:
{
rlTextureParameters(texture.id, RL_TEXTURE_TEXTURE_WRAP_S, RL_TEXTURE_WRAP_CLAMP);
rlTextureParameters(texture.id, RL_TEXTURE_TEXTURE_WRAP_T, RL_TEXTURE_WRAP_CLAMP);
rlTextureParameters(texture.id, RL_TEXTURE_WRAP_S, RL_TEXTURE_WRAP_CLAMP);
rlTextureParameters(texture.id, RL_TEXTURE_WRAP_T, RL_TEXTURE_WRAP_CLAMP);
} break;
case TEXTURE_WRAP_MIRROR_REPEAT:
{
rlTextureParameters(texture.id, RL_TEXTURE_TEXTURE_WRAP_S, RL_TEXTURE_WRAP_MIRROR_REPEAT);
rlTextureParameters(texture.id, RL_TEXTURE_TEXTURE_WRAP_T, RL_TEXTURE_WRAP_MIRROR_REPEAT);
rlTextureParameters(texture.id, RL_TEXTURE_WRAP_S, RL_TEXTURE_WRAP_MIRROR_REPEAT);
rlTextureParameters(texture.id, RL_TEXTURE_WRAP_T, RL_TEXTURE_WRAP_MIRROR_REPEAT);
} break;
case TEXTURE_WRAP_MIRROR_CLAMP:
{
rlTextureParameters(texture.id, RL_TEXTURE_TEXTURE_WRAP_S, RL_TEXTURE_WRAP_MIRROR_CLAMP);
rlTextureParameters(texture.id, RL_TEXTURE_TEXTURE_WRAP_T, RL_TEXTURE_WRAP_MIRROR_CLAMP);
rlTextureParameters(texture.id, RL_TEXTURE_WRAP_S, RL_TEXTURE_WRAP_MIRROR_CLAMP);
rlTextureParameters(texture.id, RL_TEXTURE_WRAP_T, RL_TEXTURE_WRAP_MIRROR_CLAMP);
} break;
default: break;
}

Loading…
Cancel
Save