Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » What versions DirectX can I use with Allegro 5?

This thread is locked; no one can reply to it. rss feed Print
What versions DirectX can I use with Allegro 5?
ISDcaptain
Member #15,087
May 2013

Dx 7,8,9,10,11? Which ones?

jmasterx
Member #11,410
October 2009

As far as I know, A5 creates a Direct3D9 context, so, I would say Direct3D9.

ISDcaptain
Member #15,087
May 2013

I was wondering if I could use DX8. I want to read a rpg programming book and it uses dx8. Im thinking I can use A5 to get rid of the ugly win 32 code and just use dx8 for the 3d rendering

l j
Member #10,584
January 2009
avatar

DX8 is very old and outdated, DX9 is already outdated, but it's the last version supported by Windows XP which is still in use today.

jmasterx
Member #11,410
October 2009

The point of using Allegro is to abstract away the API, so it shouldn't matter. The algorithms will be the same.

Though I'd suggest OpenGL. It uses extensions instead of versions and if you write n GL you can easily port to a lot of other platforms.

ISDcaptain
Member #15,087
May 2013

But can A5 do 3d? I know A4 couldnt. As for OpenGL, if I used it, I would use fixed function opengl. Not shader based. Im just a hobbyist, not professional programmer. I dont got the time for shaders and the complexities they bring.

Thomas Fjellstrom
Member #476
June 2000
avatar

Allegro 5 uses D3D for its graphics on windows by default, but also supports OpenGL.

Basically allegro sets up a window and a rendering context for either D3D or OpenGL based on what you tell it to do. You can then use either allegro, or one of the two 3d apis to render your game.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Kris Asick
Member #1,424
July 2001

But can A5 do 3d? I know A4 couldnt. As for OpenGL, if I used it, I would use fixed function opengl. Not shader based. Im just a hobbyist, not professional programmer. I dont got the time for shaders and the complexities they bring.

A4 COULD do 3D, just not with hardware acceleration. ;)

A5 doesn't support 3D directly, at least, not the stable 5.0.x branch. You'll need to code the 3D aspects yourself directly in Direct3D or OpenGL, but can do so alongside Allegro so long as you remember to set anything you change back to the way it should be before continuing to call Allegro functions. (Unless you intentionally want those changes to affect those functions.)

Also, avoid DX8 or prior. Windows 8 has TERRIBLE support for anything pre-DX9, resulting in aliasing artifacts and poor framerates. (Though all non-graphical aspects work as they should.)

--- Kris Asick (Gemini)
--- http://www.pixelships.com

ISDcaptain
Member #15,087
May 2013

Eh I think I decided Im just gonna use Allegro 5 for everything and old school OpenGL for the rendering rather than using the ugly Win32 code and Dx8. It should make it a lot more clean and readable.

Kris Asick
Member #1,424
July 2001

There's also almost no reason to add DX8 support to a game considering even Windows 98 can be updated to support DX9. ;)

--- Kris Asick (Gemini)
--- http://www.pixelships.com

Go to: