AGS & Direct3D/OpenGL (a very technical question)

Started by Besh, Mon 23/01/2006 20:59:57

Previous topic - Next topic

Besh

I have tried to use AGS with Direct3D and with OpenGL (AllegroGL):
- D3D: in window mode it seems to work, even if rather slowly but in fullscreen mode it doesn't work
- AGL: it doesn't work at all

If AGS is based on Allegro, it is possible to allow to use AllegroGL???
or if AGS is based on DirectDraw, it is possible to allow to use D3D???


"Spread our codes to the stars,
You can rescue us all"
- Muse

scotch

I'm afraid your assumptions are wrong, there is no way to make an allegro program use opengl without rewriting it, and there is no way to make a directdraw program use d3d without doing the same.
I do wonder how you attempted to do it though...

Besh

Good question  ;D

I have write a plugin that use D3D to render to backbuffer (or to texture) and then copy the 3D scene in AGS screen, in windowed mode it works but in fullscreen mode if I create the D3D device before AGS init its graphics driver the system crash and if I create the devive after it doesn't start.
I also try to create a new window from plugin, link a D3D device to it and render, the system doesn't crash but in fullscreen mode it  doesn't work at all.

For AllegroGL/OpenGL I have do the same.
"Spread our codes to the stars,
You can rescue us all"
- Muse

Pumaman

I can see that rendering to a D3D backbuffer and then blitting the result to the AGS DirectDraw surface might work (as it has for you in windowed mode), but I'm not really sure if it is properly supported, or why it doesn't work in full screen.

I think that in order to get AllegroGL to work, the whole application needs to use AGL (ie. the screen bitmap needs to be created as an AGL bitmap rather than a normal Allegro bitmap) which might explain why it doesn't work.

I have briefly experimented with writing an Allegro D3D driver in order to port AGS to Direct3D 8 to gain from hardware acceleration, but it turned out that it was going to take far more time to accomplish than I hoped, so I gave up.

SMF spam blocked by CleanTalk