Using Allegro as a new driver for Max2D
BlitzMax Forums/BlitzMax Module Tweaks/Using Allegro as a new driver for Max2D
| ||
Hi everybody. I just tried to use the gfx capabilities of the Allegro game programming library to add a true 2D software backend to Max2D. As Allegro can be compiled for Windows, Linux and Mac this could made it a good choice. All that integrated transparently by typing: SetGraphicsDriver AllegroMax2DDriver() For the moment, I only succeed in : - Opening windowed/fullscreen display. - Drawing simple primitives (lines, plot, poly) And I got very good FPS performances. Unfortunately, I don't feel capable of handling hard topics: - Drawing/Grabing pixmaps (due to conversion between bmax Pixmap and Allegro BITMAP objects.) - Forwarding keyboard and mouse events from the Allegro window to the underlying bmax handler. If nobody is interrested to help I will surely give up. But if someone is interrested and want to begin a community project, I can publish the source of my work on the forum. |
| ||
There is a fully working SDL for blitzmax if you care to do a search... |
| ||
Yep, right here: http://www.blitzbasic.com/Community/posts.php?topic=49216&hl=sdl Russell |
| ||
OK, I found it also. As I didn't know that much about SDL (I heard of it) I though it achieved poor performences compared to allegro. Today I made some test with SDL 1.2.9 and was quite happy with it. And with sdl_gfx we could get rotation and zoom as expected by any descent MAX2d module. Now the problem is : I'd like it to be seemlessly integrated as a Max2D module, i.e instead of using SDL dedicated functions to open a display and draw things on it, it should be very cool to just issue a: SetGfxDriver SDLMax2DDriver() and then use usual commands (Graphics, DrawLine, ...) Has anyone began to work on this integration ? |