Allegro.cc - Online Community

Allegro.cc Forums » Allegro Development » The true reason allegro is so damned slow in windows.

This thread is locked; no one can reply to it. rss feed Print
 1   2 
The true reason allegro is so damned slow in windows.
Burnt One
Member #3,014
December 2002

Its still using direct draw 1.0. Most common video cards bearly support because all accelaration is stacked on 3d performance. All modern day 2d video games take advantange of 3d hardware accelaration in ways far superior to allegros. Well im finnaly going to make the switch to DX, Good bye all

X-G
Member #856
December 2000
avatar

Uh ... to begin with, it uses DirectX 3 functions, not 1. And there's more to it than this. I'm not the right person for telling you about this, though. Someone with more sk177z will come along and post shortly, I'm sure ...

--
Since 2008-Jun-18, democracy in Sweden is dead. | 悪霊退散!悪霊退散!怨霊、物の怪、困った時は ドーマン!セーマン!ドーマン!セーマン! 直ぐに呼びましょう陰陽師レッツゴー!

Matthew Leverton
Supreme Loser
January 1999
avatar

Have fun. All it would take is to write a DX_fill_in_the_blank driver for Allegro. There's nothing limiting Allegro to using DX3. However, the nice thing about the DX3 driver is that it means your game will run on Windows 95/NT. Both of those OS's are not supported any longer by Microsoft.

So if you want to switch to a Windows-only solution because your simple 2D game cannot run fast enough, then go ahead. No one here is going to try to stop you. :)

X-G
Member #856
December 2000
avatar

Who said it was so god damn slow under Windows anyway? I get quite excellent frame rates, thank you very much.

--
Since 2008-Jun-18, democracy in Sweden is dead. | 悪霊退散!悪霊退散!怨霊、物の怪、困った時は ドーマン!セーマン!ドーマン!セーマン! 直ぐに呼びましょう陰陽師レッツゴー!

23yrold3yrold
Member #1,134
March 2001
avatar

My games move way faster using MinGW than DJGPP, so something's working :) Plus using video bitmaps (read: hardware acceleration) is another boost. If it's a big problem for you, Allegro 5 is supposed to use OpenGL for a lot of its graphics. Zoom zoom ...

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

Goodbytes
Member #448
June 2000
avatar

23yrold3yrold said:

If it's a big problem for you, Allegro 5 is supposed to use OpenGL for a lot of its graphics.

Uhh... cough*wrong*cough

At least, I'm pretty sure that that isn't true. Or is it? Care to clarify a poor, confused soul?


--
~Goodbytes

23yrold3yrold
Member #1,134
March 2001
avatar

Bob would know for sure better than I :) I just remember seeing it mentioned by someone ...

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

Aguydude
Member #2,568
July 2002

If you want speed, just use AllegroGL or whatever it was. In fact, just use openGL. Anyhow, I haven't had any speed problems so far. If your computer has a speed concern, it shouldn't be running above DX3 anyways.

Bob
Free Market Evangelist
September 2000
avatar

Quote:

Its still using direct draw 1.0.

1. What do you think DirectDraw 7 is going to bring you, in terms of speed?
2. What do you think D3D will bring you, in terms of 2D blitting speed?
3. What makes you think it's the DDraw driver's fault that Allegro is slow?
4. Could you, at the very least, provide some insight into this "slowliness" business.
Until then, I'm writting you off as a troll. Have fun!

Quote:

At least, I'm pretty sure that that isn't true. Or is it? Care to clarify a poor, confused soul?

Ideally, I'd like for the AllegroGL Allegro driver to be merged in the main tree. However, there is some resistence, or at least, lack of enthuiasm, for it. It might happen when AllegroGL matures a bit more, or it may not at all. It's current undecided.

--
- Bob
[ -- All my signature links are 404 -- ]

Korval
Member #1,538
September 2001
avatar

Quote:

2. What do you think D3D will bring you, in terms of 2D blitting speed?

Quite a bit, actually.

You can get hardware-accelerated trans blitting, which you don't get from DirectDraw.

Quote:

Ideally, I'd like for the AllegroGL Allegro driver to be merged in the main tree. However, there is some resistence, or at least, lack of enthuiasm, for it. It might happen when AllegroGL matures a bit more, or it may not at all. It's current undecided.

What is wrong with those people? Are they so backwards that they can't comprehend that the GL driver, not only makes sense, but it makes Allegro far more useful and fast?

As it stands now, there is no way to get hardware accelerated blended blits, even though hardware as old as the Voodoo1 allows it. And, TNT1's and better support GL, while still allowing for hardware blended blitting.

Do they just want Allegro to be some kind of learning toy for low-end programmers who haven't graduated to something that provides real power (or who are stuck on low-end computers)? Or do they want Allegro to be the preferred 2D game API?

MiquelFire
Member #3,110
January 2003
avatar

Somewhere in the docs, they say that Allegro is meant as a 2D game library, not 3D.

---
Febreze (and other air fresheners actually) is just below perfumes/colognes, and that's just below dead skunks in terms of smells that offend my nose.
MiquelFire.red
If anyone is of the opinion that there is no systemic racism in America, they're either blind, stupid, or racist too. ~Edgar Reynaldo

Bob
Free Market Evangelist
September 2000
avatar

Korval: I don't know if you've seen the latest version of AllegroGL (or the CVS one), but the driver is very very incomplete. As such, it's not very useful to integrate it into Allegro at this point in time.

Miquel: Nowhere has anyone mentioned 3D. OpenGL (or even D3D) does not imply that 3D feature would be used.

Quote:

You can get hardware-accelerated trans blitting, which you don't get from DirectDraw.

Unfortunately, this is completely incompatible with Allegro's (current, and IMO severly broken) blending system. Better left as an add-on for now.

--
- Bob
[ -- All my signature links are 404 -- ]

Korval
Member #1,538
September 2001
avatar

Quote:

I don't know if you've seen the latest version of AllegroGL (or the CVS one), but the driver is very very incomplete. As such, it's not very useful to integrate it into Allegro at this point in time.

Does the reluctance you're seeing stem from an unwillingness to use AllegroGL code, or an unwillingness to use OpenGL at all? The former, I can understand. The latter makes no sense.

Quote:

Unfortunately, this is completely incompatible with Allegro's (current, and IMO severly broken) blending system.

Yet another thing that needs to be fixed in Allegro, and yet another page that should be taken from OpenGL/D3D.

Thomas Harte
Member #33
April 2000
avatar

Quote:

Have fun. All it would take is to write a DX_fill_in_the_blank driver for Allegro

Is there documentation, or some sort of guide on how to write new drivers anywhere? I ask this from time to time, and there wasn't last time I asked, but...

Quote:

Does the reluctance you're seeing stem from an unwillingness to use AllegroGL code, or an unwillingness to use OpenGL at all? The former, I can understand. The latter makes no sense.

Perhaps the way that Allegro doesn't expose much terribly useful information about its hardware targets puts the developers off OpenGL because its thinking regarding such things as knowing the internal format of the frame buffer and such like is so radically different to the other targets.

Relevantly to this forum, I still vote in favour of Allegro 5 being given bitmap creation functions which allow users to pass hints about what they want to do with the surfaces (blitting, pixel painting, etc) rather than directly assuming that memory bitmaps are fastest for blitting, system bitmaps (if available) are a compromise and that memory bitmaps are best for pixel painting. Or whatever you chose to assume.

Quote:

As it stands now, there is no way to get hardware accelerated blended blits, even though hardware as old as the Voodoo1 allows it. And, TNT1's and better support GL, while still allowing for hardware blended blitting.

The voodoo1 supports GL! Although the official drivers have a broken glPolygonOffset and MESA has broken quad strips when using compiled vertex arrays.

Bob
Free Market Evangelist
September 2000
avatar

Quote:

Is there documentation, or some sort of guide on how to write new drivers anywhere? I ask this from time to time, and there wasn't last time I asked, but..

Not that I know of. However, you can base yourself on AllegroGL, which has the code for this 3 times (Windows, X and DOS/MESA).

--
- Bob
[ -- All my signature links are 404 -- ]

Allen Harris
Member #2,855
October 2002

DX1?? Isn't that from the Windows 3.11 era??
Haha.
The reason it is slow is because it is designed as a platform independent, high level development library. It is not fitted either toward game programming or applicatin development. It is meant to work out basic output and input functionality available on most video cards dating back to like 97 (haha be4 the GHz processor era if I'm not mistaken).
If u don't like allegro, or feel it doesn't fit your needs, u could try AllegroGL (which is geared more toward 3D design). And, if that's no good, then instead of complaining, maybe u could try writing an extention of Allegro to allow nicer video functionality.
It's free, it works, and it's well documented. Don't look a gift horse in the mouth.

-- CM

Chris Katko
Member #1,881
January 2002
avatar

DX one was windows 95 wasn't it?

If it uses DX 3 (or whatever), couldn't we just write a new driver that uses DirectX 8 (or 9) and just list it as a seperate driver? That way, if allegro can't use DX8, it'll use DX3, and then finally GDI. It already does that with DirectX and GDI doesn't it? (i.e., GFX_AUTODETECT)

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

Burnt One
Member #3,014
December 2002

I said direct draw 1.0 specifcations for video cards, which arent accelarted nearly as much as doing 2d on d3d(even faster using pixel shaders which AMD/Intel are releasing thereown versions of soon for there CPU's)

Everything beyond blitting (and possibly that to) will defiantly be executed faster... much faster on nice cards.

Writing a driver for it i suppose is completely possible... although i agree with Bob i really dont like allegros blender routines (havent looked at fblend but if the designs anything like it i wont like it)

I dunno theres alot of other things i dont like about allegro to is why im leaving (not trying to be rude or nothing just stating some things maybe to be changed,or not) I dont like C. It would be so much nicer to have everythign self contained in C++, use more callback functions and such. I guess i could again write a wrapper but its alot of work for something that needs its display driver updated to:P

Bob
Free Market Evangelist
September 2000
avatar

Quote:

I said direct draw 1.0 specifcations for video cards, which arent accelarted nearly as much as doing 2d on d3d

Post a single benchmark (not involving blending) that proves you point. Allegro vs D3D, without blending.

Quote:

(even faster using pixel shaders which AMD/Intel are releasing thereown versions of soon for there CPU's)

Huh? "pixel shaders" will neither make Allegro faster, nor are Intel/AMD making their own versions of it for execution on their CPUs.

Quote:

It would be so much nicer to have everythign self contained in C++

Step 1: Create a .cpp file
Step 2: Edit said file
Step 3: Insert "#include <allegro.h>"
Step 4: You're done.

C++ != Object Oriented. It's not because you use C++ that you have object oriented designs, nor the inverse. Allegro 4 is partially OO (mainly the bitmap routines). Allegro 5 will push this a bit further, but not to the detriment of ease-of-use.

Quote:

use more callback functions and such

You perhaps don't realize the available features you have access to (or don't, in this case), inside a callback, especially one that runs in interrupts context.

Quote:

If it uses DX 3 (or whatever), couldn't we just write a new driver that uses DirectX 8 (or 9)

Yep. This is what AllegroGL does. Someone could pick up on the ideas developed there and write a D3D 9 version. D3D 8 might be more complicated, as it doesn't support clip rectangles.

--
- Bob
[ -- All my signature links are 404 -- ]

Burnt One
Member #3,014
December 2002

I cant post any benchmarks allegro doesnt work with my video card(ati radeon 9000 pro,dx9,using ati catalyst drivers),and i removed all my programming shit from my other computer

Rafal Szyja
Member #2,408
June 2002
avatar

on my card - Alliance AT25 (6MB PCI, VESA2) most of DOS programs are faster that win32 ones :)

_____________________________________________________________
My website: [url http://rafalszyja.republika.pl]
Gadugadu:3646465 ICQ: 177671442

Oscar Giner
Member #2,207
April 2002
avatar

Quote:

C++ != Object Oriented

There's a proof for that. Eiffel is a completely OOP language (even more than C++), and the Eiffel compiler just generates plain C code, so OO can be done with pure C.

X-G
Member #856
December 2000
avatar

It certainly CAN, but the language isn't made for it, and it's a horrible hassle and not really good for anything when you have C++.

--
Since 2008-Jun-18, democracy in Sweden is dead. | 悪霊退散!悪霊退散!怨霊、物の怪、困った時は ドーマン!セーマン!ドーマン!セーマン! 直ぐに呼びましょう陰陽師レッツゴー!

Oscar Giner
Member #2,207
April 2002
avatar

The only difference is that C++ does a lot of things for you. You never know, maybe there's some kind of library out there that helps doing oop with C.

X-G
Member #856
December 2000
avatar

Ask mahogny a.k.a. Johan Henriksson about it. He's been doing some polymorphic things in C. ::)

--
Since 2008-Jun-18, democracy in Sweden is dead. | 悪霊退散!悪霊退散!怨霊、物の怪、困った時は ドーマン!セーマン!ドーマン!セーマン! 直ぐに呼びましょう陰陽師レッツゴー!

 1   2 


Go to: