RFC: GUIGraphicsDriver

BlitzMax Forums/MaxGUI Module/RFC: GUIGraphicsDriver

UByte(Posted 2009) [#1]
At the moment MaxGUI apps are restricted to using OpenGL/DirectX for rendering to canvases. For me this is an unnecessary overhead and breaks the look and feel of the underlying OS (for example fonts are not rendered with sub-pixel accuracy a.k.a ClearType with Max2D.)

It is entirely possible to write a graphics driver to abstract the OS's native UI drawing functions. The framework I am proposing/using is presented below, it is inspired by Java's awt.Graphics API. Notable features are:

-Ability to select a GUIFont directly into the graphics context.
-Ability to acquire the font metrics for a given GUIFont
-A native Image Class for accelerated bitmap drawing (as well as pixmaps and argb data)
-Typical primitives.
-Clipping API.
-Origin Translation.

I'm Currently working on GUIDrivers for Win32 GDI and FLTK for Linux.

I'd appreciate anyone's thoughts and suggestions on this topic. Especially anyone who would attempt a MacOSX or GTK driver.




Brucey(Posted 2009) [#2]
Since you can do all this in wxMax, there's no reason not to do it in MaxGUI too :-)


UByte(Posted 2009) [#3]
Yes there is...

because I can :)

Edit: Oops misunderstood :s


GaryV(Posted 2009) [#4]
I'm Currently working on GUIDrivers for Win32 GDI
Very interested :)


SebHoll(Posted 2009) [#5]
Hi,

Just saw this topic and it looks very interesting. Have you managed to get very far with it?


UByte(Posted 2009) [#6]
Glad there's some interest at least.

Will have to get my arse in gear and do a proof of concept soon. Been somewhat distracted. In fact I'll flesh out the GDI module over the next couple of evenings and hopefully have something ready on Monday.


EOF(Posted 2009) [#7]
I had a dabble in GUI graphics before. The only thing I could not figure out is how to implement image rotation and alpha
Also, how to load mage fformats other than BMP