DirectDraw graphics library

Windows specific forum
OgreVorbis
User
User
Posts: 77
Joined: Thu Jan 16, 2020 10:47 pm

DirectDraw graphics library

Post by OgreVorbis »

Is there either a directdraw library for PB or maybe a previous version that renders 2D graphics in directdraw instead of DirectX?

I'm into retro computers and I'm using a Vortex86DX3. Many older systems work better with DirectDraw for 2D. The vortex specifically ONLY has directdraw.

Thanks. It's nothing serious - just for fun.

And BTW I did find the mini directdraw example, but wondering if there is something more complete.
My blog/software site: http://dosaidsoft.com/
User avatar
Mijikai
Addict
Addict
Posts: 1360
Joined: Sun Sep 11, 2016 2:17 pm

Re: DirectDraw graphics library

Post by Mijikai »

I dont know about a library nor if previous PB Version used DDRAW at some point.
Maybe it is possible to write such library, what version of DDRAW are you aming for?
Its easier to find information about some versions vs. other versions.
Structures, constants and interfaces are not really a problem,
but information and examples on how to use them can be difficult is to find.
The less popular or older the version the more difficult it gets.
Im myself interested in old school tech so i would help writing such a lib.
Krix
User
User
Posts: 65
Joined: Fri Mar 11, 2005 6:24 pm
Location: Toronto

Re: DirectDraw graphics library

Post by Krix »

The last PureBasic version with DirectX7 (last directx with directdraw) was version 5.0...so accessing directdraw by using older versions of PB would be V5.00 or previous versions. Version 4.61 was pretty solid. In these older versions there are two sprite libraries. The Sprite3D with support for sprite rotation, zoom etc. using either DirectX9 (default) or DirectX7 or OpenGL subsystems. Or the regular Sprite lib that doesn't support rotation, zoom, etc. but could use directdraw through DirectX7 subsystem. So to test it you could download v4.61 and check the sprite examples or even better there is also a mini game example called Waponez (Examples\Source-Advanced\Waponez II). In general just don't forget to only use the non 3D sprite functions and in the compiler option set the library subsystem to DirectX7.

Hope it helps!

:)
User avatar
Mijikai
Addict
Addict
Posts: 1360
Joined: Sun Sep 11, 2016 2:17 pm

Re: DirectDraw graphics library

Post by Mijikai »

It would be nice to have a lib, DDRAW7 seems to be the best choice.

I translated ddraw.h to PureBasic and did some tests.
Seems that newer hardware doesnt allow 8 or 16 bits depth modes.

So there could be an issue running "older tech" games on newer hardware...
Or is it still possible to use palettes?
User avatar
Mijikai
Addict
Addict
Posts: 1360
Joined: Sun Sep 11, 2016 2:17 pm

Re: DirectDraw graphics library

Post by Mijikai »

I played around with directdraw - its nice but not very intuitive or useable (nowdays).
That and the lack of interest in ddraw in general is why i gave up on creating a ddraw gfx lib.

The translated ddraw.h can be found here: viewtopic.php?p=574350#p574350
So if anyone wants to play around with ddraw and or create a lib this should help quite a bit :)

Anyway the good news is that i started to code a retro gfx lib (based on the SPP gfx lib)
in order to bring back easy gfx coding, direct access to the VRam and Palettes. 8)
Just like in the good old days.
OgreVorbis
User
User
Posts: 77
Joined: Thu Jan 16, 2020 10:47 pm

Re: DirectDraw graphics library

Post by OgreVorbis »

I forgot about this post because I didn't have access to that old comp for a while. I'll definitely give V4.61 a try.

And thanks Mijikai :)
My blog/software site: http://dosaidsoft.com/
Post Reply