|
[A5] al_get_new_display_option |
wiseguy
Member #44
April 2000
|
Hi, I'm trying to query the maximum loadable bitmap size, but not having any luck. I'm using: maxBmp = al_get_new_display_option(ALLEGRO_MAX_BITMAP_SIZE, &importance); The documentation says that when queried, ALLEGRO_MAX_BITMAP_SIZE returns both the maximum width and height, but the al_get_new_display_option function only returns one integer? Is the other size returned in importance? Or am I totally trying to do this the wrong way. The reason I'm trying to figure this out is because I have two separate programs in which I try to load the same image. In one program, the image loads fine. In the other, it does not load. I am trying to figure out if perhaps the image is too large to load because of different display sizes? |
Matthew Leverton
Supreme Loser
January 1999
|
I would assume the returned size is both the height and width. e.g. 512 would be 512x512. |
wiseguy
Member #44
April 2000
|
That's what I was thinking as well, but when I called the function it returned 0. On a side note, I switched the application back to a windowed display mode and the bitmap loaded correctly. |
Matthew Leverton
Supreme Loser
January 1999
|
Does al_get_display_option() work? |
wiseguy
Member #44
April 2000
|
I have a screen resolution of 800x600 in windowed mode, and calling sets maxBmp to 0. Maybe I'm just using it wrong. I will try to look through the A5 source and see what I'm missing. [Edit] Calling maxBmp = al_get_display_option(scr, ALLEGRO_MAX_BITMAP_SIZE); sets maxBmp to 11. |
Matthew Leverton
Supreme Loser
January 1999
|
Maybe that means 2^11 or 2048x2048. I'm just guessing. |
kenmasters1976
Member #8,794
July 2007
|
Interesting. It also returns 11 on my old integrated Intel graphics card and it doesn't support creating a 2048x2048 bitmap. It returns 11 when using D3D and won't create a 2048x2048 bitmap. Using OpenGL it returns 2048 and 2048x2048 bitmap creation works. The maximum bitmap size on my card seems to be 1024x1024 when using D3D.
|
Thomas Fjellstrom
Member #476
June 2000
|
I think you just found a bug in our D3D code. -- |
wiseguy
Member #44
April 2000
|
Ok, so then I'm not just totally doing this wrong? If I can help with testing anything on windows let me know. On a side note, those function calls return the same numbers in both windowed and fullscreen mode, but the bitmap, which is 1824x1824, loads successfully in windowed mode. [Edit] Ok, interesting note: The bitmap loads successfully if I load it using my "load map" routine, but only fails when using al_load_bitmap using the path from the native filechooser. I am thinking this is probably more a problem on my end rather than a bug in allegro. |
kenmasters1976
Member #8,794
July 2007
|
Thomas Fjellstrom said: I think you just found a bug in our D3D code. Funny that no one found it before as it seems like something you'd want to check in your code.
|
Trent Gamblin
Member #261
April 2000
|
Whenever those display options became retrievable, nobody bothered to update the direct3d code to handle them. Since sourceforge won't reset my password, I can't commit a fix right now but here's a patch.
|
|