Closed ASGART1907 closed 6 months ago
Always check the logs in these cases. You use ../
in your code to access the directory, which won't work.
If you want to include files in your application, you have the assets
directory along this path from the root of your project: app/src/main/assets
.
So, put your image rocket2.png
in the assets
directory and simply use LoadTexture("rocket2.png")
. You can also put it in a subdirectory and use LoadTexture("images/rocket2.png")
.
Note that on Android, you should prefer using raylib functions to load all your files from the assets directory; they are configured to use the AssetManager on Android.
This works. Thank you very much for your reply...
The texture I can create on desktop cannot be created on Android. The path is correct. Am I keeping the image in the wrong place? Here is my code: `#include "raymob.h"
include
include
const int screenWidth = 800; const int screenHeight = 450;
static void UpdateDrawFrame(Texture2D texture);
int main() { InitWindow(screenWidth, screenHeight, "./raylib");
}
static void UpdateDrawFrame(Texture2D texture) { BeginDrawing(); ClearBackground(BLACK); DrawTexture(texture,100,100,RAYWHITE); EndDrawing(); } `