raylib icon indicating copy to clipboard operation
raylib copied to clipboard

[rtextures] `IsTextureReady()` returns false after successful call of `LoadTextureCubemap()`

Open kolunmi opened this issue 1 year ago • 6 comments

Please, before submitting a new issue verify and check:

  • [x] I tested it on latest raylib version from master branch
  • [x] I checked there is no similar issue already reported
  • [x] I checked the documentation on the wiki
  • [x] My code has no errors or misuse of raylib

Issue description

Hello! The title is pretty self-explanatory.

Environment

Arch linux:

INFO: GL: OpenGL device information:
INFO:     > Vendor:   AMD
INFO:     > Renderer: AMD Radeon RX 7900 XTX (radeonsi, navi31, LLVM 16.0.6, DRM 3.54, 6.6.7-arch1-1)
INFO:     > Version:  4.6 (Core Profile) Mesa 23.3.1-arch1.1
INFO:     > GLSL:     4.60

Code Example

#include <stdio.h>
#include <raylib.h>

int main(int argc, char **argv) {
  InitWindow(800, 600, "Test");

  Image img = GenImageColor(600, 100, WHITE);
  Texture tex = LoadTextureCubemap(img, CUBEMAP_LAYOUT_LINE_HORIZONTAL);
  UnloadImage(img);

  bool success = IsTextureReady(tex);
  printf("IsTextureReady() reports a %s!\n", success ? "success" : "failure");

  UnloadTexture(tex);
  CloseWindow();

  return 0;
}

yields:

INFO: TEXTURE: [ID 3] Cubemap texture loaded successfully (100x100)
IsTextureReady() reports a failure!

Thank you for this amazing library!

kolunmi avatar Dec 23 '23 00:12 kolunmi

@kolunmi thanks for reporting! reviewed!

raysan5 avatar Dec 23 '23 10:12 raysan5

@kolunmi By the way, this issue appeared because there has never been a proper cubemap loading example... :(

raysan5 avatar Dec 25 '23 14:12 raysan5

@raysan5 @kolunmi Can I work on this if somebody isn't working on it already?

amitansu1024 avatar Dec 31 '23 04:12 amitansu1024

@amitansu1024 Feel free, actually, a new textures_cubemap.c example would be nice to illustrate LoadTextureCubemap() capabilities that probably have not been tested enough.

raysan5 avatar Dec 31 '23 14:12 raysan5

Has been this solved yet?

Dev-Tade avatar Feb 16 '24 19:02 Dev-Tade

@Dev-Tade it does not seem so

raysan5 avatar Feb 16 '24 21:02 raysan5