![]() |
|
blit does not work under wxwidgets |
mail frank
Member #6,213
September 2005
|
I've managed to write a allegro program under wxwidgets for windows. My program is just load a bmp file and display on a wxWindow by Allegro. Unfortunately there are some functions does not work such as blit,install_keyboard etc. Here is part of my code: ( for complete source code, please refer to the attachment.)
Can anybody advise? |
Michael Faerber
Member #4,800
July 2004
![]() |
What is the effect? Is there just a black window, or does the program crash ...? -- |
Felipe Maia
Member #6,190
September 2005
![]() |
Install keyboard probably will not work because of wxWidgets way of mapping keyboard itself. Your code is broke on the DrawBackground, a mass memoryleak, I don't know why it's not drawing, but the evt_Paint isn't sent all the time, so if you probably resize the window, the bitmap will show. |
BAF
Member #2,981
December 2002
![]() |
wxWidgets doesn't do anything special with the keyboard AFAIK, it just uses the messages from Windows, like any other GUI. |
mail frank
Member #6,213
September 2005
|
I think wxWidgets is just us win32 api if running in Windows. I don't know why the behalf of wxWidgets is so different. I just copy the idea of dxwindow.c under Allegro test. The behalf of my code is: |
BAF
Member #2,981
December 2002
![]() |
Why are you using a directx window with wx? Why not just install_allegro with SYSTEM_NONE, then run graphics blitting to the wx window? Search the forums, in one of the wx threads I posted my code for that. |
mail frank
Member #6,213
September 2005
|
The reason why I'm using Directx win is that I believe the performance should be better. Because I have quite a few sprite animations. The reason why I'm using it under wx is that I like its GUI. When you say use SYSTEM_NOTE, can I still use draw_sprite or blit functions or do you mean to use something like blit_to_hdc? How's the performance? |
|