Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » allegro 4 + codeblocks + wxWidgets

This thread is locked; no one can reply to it. rss feed Print
allegro 4 + codeblocks + wxWidgets
Britait
Member #16,753
October 2017

Hello mates

I've been using allegro for years, using allegro 4.x for my small projects

After installing allegro 4.2 (dll mode) and wxWidgets 3.0.1 in the same compiler (codeblocks 16.01), I find difficult to integrate a library with another ... my idea is to create a windows app that uses buttons, textbox and other typical things of windows visual interface, but adding an object inside the form that is a graphical window of allegro, like the example image (it's a fake image created as example)

I have seen that is possible to run allegro without any graphical window and working only with memory bitmaps, and my first idea was to create two independent processes (one in wxWidgets, other with allegro) that share memory to dynamically create images with a process that hang in the form as a image in the other, but that seems to me inefficient

I searched for documentation and found ways to do it in allegro 5, but the 5th version of the library never convinced me

I would like to know if someone already tried it or have some advice to give me about how to get this in a unique process withing the same project, thanks

beoran
Member #12,636
March 2011

To use WXWidgets together with Allegro it seem to me that you would have to write an Allegro backend for WXWidgets. Not infeasible but certainly a lot of work. An Allegro specific GUI library might be easier.

What about Allegro5 fails to convince you? Allegro4 is outdated and unsupported. I would really recommend allegro5 for any new project.

Britait
Member #16,753
October 2017

hello beoran, thanks for response

allegro 5 is written in c++, I prefer c (personal preferences). Also I need a graphical interface for small research projects (image process, particle dynamics and others), allegro 5 is too focused in games. For last, I've been using Allegro 4 for over 10 years, simple laziness to learn another way to do the same

I have written half of a GUI for allegro 4, but for intensive menus and data handling app's would prefer to use the windows native GUI

beoran
Member #12,636
March 2011

Whoa there, Allegro 5 is by and large implemented in C and has a pure C API. We do use some C++ on Windows, some objective-c on osx or ios, and some java on Android, but that is just the backend drivers. You can use Allegro5 with C++, but that is certainly not required. You can use the pure C API with a C compiler only. Like I do. 😃

Allegro5 is just like allegro4 useful for games, but it can be used for all sorts of graphical applications. The only thing that allegro5 lacks is a built in GUI like allegro4 had, bit there are third part GUI C libraries for Allegro5, some like WidgetZ.

I also used Allegro already twenty years ago when it was on Djgpp and dos. It's true that allegro5 is different in API than allegro4, but that was a necessary change. Once I got the hang of Allegro5 I found it quite a bit better than Allegro4, and since then I never looked back.

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Britait
Member #16,753
October 2017

@beoran

thank you, sounds interesting but intimidating too, it seems that you have an expert management of the library at low level that I envy, I am satisfied with open the graphic window and put some bitmaps :P (my works are usually 80% maths and 20% graphics)

anyway I planned to use allegro 5 in future, really can work in c with 5?

@Edgar Reynaldo

eagle4 looks really a good option, I'll try it thanks

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

beoran
Member #12,636
March 2011

Sure, you certainly can use Allegro5 just with plain C. I also do that, I dislike C++. And Allegro5 isn't that hard to learn. It's well documented and there are many examples included. See https://github.com/liballeg/allegro5/tree/master/examples

You are a long time allegro4 user so I think you'll do fine learning Allegro5.

Go to: