Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Black Belt
2 Views

Direct2D stuff

This might be of interest for those that write Win32 GUI programs in Fortran.

As part of a larger, longer term project I've put together some Fortran bindings for the Direct2D API (and isolated bits of the DirectWrite and Windows Imaging Component API).  I don't think that this doubles up on anything that Intel provide out of the box with their compiler.

Performance wise, Direct2D is an improvement on GDI for most non-trivial operations and it leaves Gdiplus eating its dust.  The API isn't the most natural to use though.  The Fortran bindings attempt to hide some of the low level nonsense, but aspects of the programming model related to the use of hardware acceleration are quite different from GDI.  Ideally application programs would be calling the Direct2D APIs through some sort of "thicker" interface layer/library, that hid even more of the low level stuff, but you have to walk before you can run.

The bindings themselves are probably compilable with the current release, but there is a example/test program that requires the 17.0 beta (I think because I used EXIT from a BLOCK construct, or something like that).  Some other compiler issues are evident.

Anyway, more words about this can be found here, a zip of the source is here.

Some of my design choices are a bit ... experimental.  As always, it seemed like a good idea at the time.

0 Kudos
1 Reply
Highlighted
2 Views

Great work IanH. Will have to

Great work IanH. Will have to wait for V17 release...

Jim Dempsey

0 Kudos