|
Allegro5 software |
komons
Member #11,083
June 2009
|
Can I use Allegro5 to fully software |
Matthew Leverton
Supreme Loser
January 1999
|
Yes, if you don't need an ALLEGRO_DISPLAY. |
komons
Member #11,083
June 2009
|
Is there any fast method for send memory bitmap to window HDC? |
jmasterx
Member #11,410
October 2009
|
Could I ask why you would not want to use the graphics card? Pretty much any computer from 2005 onward easily meets Allegro5's minimum requirements. Unless you are making a game that's pretty static like Solitaire, I highly recommend you give video bitmaps a try. Also note that if you're planning to use the GDI specific HDC, why not simply use GDI+'s image drawing methods? I think you'll probably get similar speed as Allegro's software drawing routines. It's difficult to tell without knowing what you're trying to do though. Agui GUI API -> https://github.com/jmasterx/Agui |
Mark Oates
Member #1,146
March 2001
|
He may just be making a console app. -- |
komons
Member #11,083
June 2009
|
I have my app in Allegro5 and I use video bitmaps. But at now It must work on older machines, and I'd like to keep code without changes, or maybe with a few changes. The program do not render all the time, just when some objects change pos, size or image, so software renderer is a good way. |
Thomas Fjellstrom
Member #476
June 2000
|
Allegro 5 depends on having some form of OpenGL 1.1+, or D3D 9 available. If you don't have either, it just won't work. So far there is no plan to include a software only display driver on any platform. OpenGL 1.1 was released in 1997. Many computers released after 1998 should have hardware capable of running a basic Allegro 5 program. -- |
Mark Oates
Member #1,146
March 2001
|
Thomas Fjellstrom said: Allegro 5 depends on having some form of OpenGL 1.1+, or D3D 9 available. Really? I thought all the operations had software fallbacks. -- |
Matthew Leverton
Supreme Loser
January 1999
|
komons said: Is there any fast method for send memory bitmap to window HDC? I don't think A5 has any methods for that yet. Mark Oates said: I thought all the operations had software fallbacks. You can use memory bitmaps in a headless environment, but you cannot display them anywhere without an OpenGL or D3D window. |
Trent Gamblin
Member #261
April 2000
|
I would be surprised if using memory bitmaps and GDI was not very slow by default. However, when the GP2X Wiz port was created, fast software blitters for RGB_565 and RGBA_4444 were added. Those were fast enough to use on GP2X Wiz. What I did was render everything in software with those blitters, then blast it to the screen with OpenGL. You could do the same but with GDI or something like that, and that would probably in fact be faster than using OpenGL (I also used a Linux console framebuffer in my game and it was faster than OpenGL when using software rendering). The problem right now is those blitters aren't used except when compiling for GP2X... so you'd have to recompile Allegro to use them. The other thing is, the default drawing path will be used in all but the common blending cases, which I believe are ONE, ZERO and ALPHA, INVERSE_ALPHA, which at the time was the default alpha blending mode. So it's not ideal and it needs some work, but it might prove to be fast enough. Worth sharing anyhow.
|
J-Gamer
Member #12,491
January 2011
|
What does this function do then? The A5.1 Manual said: ALLEGRO_RENDER_METHOD: 0 if hardware acceleration is not used with this display. No hardware acceleration ==> no video bitmaps? " There are plenty of wonderful ideas in The Bible, but God isn't one of them." - Derezo |
Itachihro
Member #12,001
May 2010
|
Well, yes, you can apparently run on software. I don't really recommend it though - I once accidentally tapped into software emulation once by loading bitmaps before creating the display, and even though I did only 2 blits per frame I had to measure the framerate in fpm rather than fps. |
Elias
Member #358
May 2000
|
J-Gamer said: No hardware acceleration ==> no video bitmaps? No, it just tells you that DirectX/OpenGL will not be able to use HW acceleration. I think the intended use case is to set this before calling al_get_num_display_modes so it will only return those modes where acceleration is used. The flag is not very useful though. The only case where I can see it set to 0 is if the user runs with OpenGL and software Mesa - which may be faster on new systems than old GPUs, so really pointless to care about it. -- |
J-Gamer
Member #12,491
January 2011
|
Ok, it was just a wild guess " There are plenty of wonderful ideas in The Bible, but God isn't one of them." - Derezo |
|