|
failure without bitmap |
Vieira
Member #16,926
December 2018
|
Hello, I am trying to insert an image into my game and gives the following error: Assertion failed: bitmap, file d:/Libraries\build\allegro\src\allegro-git\src\bitmap_draw.c, line 138 Code: ALLEGRO_BITMAP *imagem; al_init(); al_init_image_addon(); janela = al_create_display(1080, 720); imagem = al_load_bitmap("capturar.jpg"); al_draw_bitmap(imagem, 0, 0, 0); al_flip_display(); al_rest(5400.0); al_destroy_display(janela); al_destroy_display(imagem); return 0; I wanted to know how to solve the problem, because it gave in more than one code |
dthompson
Member #5,749
April 2005
|
Hi Vieira - welcome to the forums. It seems your bitmap pointer imagem is null. This means al_load_bitmap was unable to load the file you specified, "capturar.jpg".
For future reference, please post questions like this in the programming questions subforum; "Allegro Development" is for discussion of the development of the Allegro library (rather than with it). ______________________________________________________ |
|