|
Allegro5 and Awesomium |
komons
Member #11,083
June 2009
|
How to render Awesomium buffer to Allegro5? It must work as quickly as it's possible. Buffer is a unsigned char* with BGRA format. |
SiegeLord
Member #7,827
October 2006
|
EDIT: My bad. What I said before was incorrect... A5 doesn't have BGRA format, as far as I can see. This would be the way to do it:
EDIT2: Well, this post is turning into a megafail, heh. Another approach (if you don't particularly care about doing any fancy effects) would be to lock the backbuffer directly instead of using an intermediate bitmap. I don't know which way is faster. "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
komons
Member #11,083
June 2009
|
It work better. But both are too slow. |
SiegeLord
Member #7,827
October 2006
|
How much time is spent converting between the color formats? Do you get any speedups if you simply memcpy the Awesomium buffer into the locked buffer? "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
komons
Member #11,083
June 2009
|
I have another idea. What you think about shader program? |
SiegeLord
Member #7,827
October 2006
|
That is what I was getting at. Doing only the uploading on the CPU, but then using a shader to convert RGBA to BGRA. "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
|