Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Has anyone tried MyGUI?

Credits go to pkrcel for helping out!
This thread is locked; no one can reply to it. rss feed Print
Has anyone tried MyGUI?
vkensou
Member #15,546
March 2014

I'm trying to make allegro5 and MyGUI work together.
But there has a problem in MyGUI's render texts.like this:
<img src="https://d1cxvcw9gjxu2x.cloudfront.net/attachments/608467 />
Maybe someone already get the work finished.

How to show a picture from my computer in this topic?:'(

pkrcel
Member #14,001
February 2012

Ware you using UNICODE?

you sure MyGUI does support your text rendering?

It is unlikely that Google shares your distaste for capitalism. - Derezo
If one had the eternity of time, one would do things later. - Johan Halmén

vkensou
Member #15,546
March 2014

to pkrcel

MyGUI also use UTF8 to handle text. and it can render text with allegro now.
but its rendering text have some problems.

pkrcel
Member #14,001
February 2012

I don't see an Allegro renderer in MyGUI sources, are you sharing the OpenGL context?

In this same applicaiton, can Allegro render your Unicode texts correctly?

It is unlikely that Google shares your distaste for capitalism. - Derezo
If one had the eternity of time, one would do things later. - Johan Halmén

vkensou
Member #15,546
March 2014

yes ,i am very sure allegro can work with mygui, and render texts normally.
mygui use freetype to render texts ,just like allegro.

oh i have solved this problem.

now texts could render normally.:D

there are two points need attention:
1.
in allegro default blender is al_set_blender(ALLEGRO_ADD, ALLEGRO_ONE, ALLEGRO_INVERSE_ALPHA)
but mygui's font texture is non-pre-multiplied, so i need set blender as:
al_set_blender(ALLEGRO_ADD, ALLEGRO_ALPHA, ALLEGRO_INVERSE_ALPHA)

2.
allegro didnt support pixel format A8L8, but in mygui ,default font texture is A8L8.so we need tell mygui dont use A8L8.

Go to: