I'm trying to convert an application I've written from Qt to Wx for licensing reasons, luckily I thought this might happen and barely integrated the GUI at all, in favor of a C adapter; however even then I'm having problems. So I'm having trouble figuring out how to do things in Wx that I could do with Qt.
In Qt I had a QHorizontalSizer with a check box, a spacer, and a button, the effect was that the check box was left aligned and the button was right aligned. When I tried this in Wx the result was that each item in the sizer took up 1/3 of the space, which is not at all what I want. Even with the button set to not expand and as being right aligned, each item seems to want to be the same size. Next I tried it with a flexgrid sizer using only 1 row, and now the sizer took up no space at all. So now I am at a loss.
How do i render to an OpenGl canvas from a secondary thread? Do I just create the GL context in the second thread and render normally ending with wx's SwapBuffers()? if so is SwapBuffers a blocking operation when vsync is on?
Is there an equivalent of QPainter? I saw that wxCanvas seems to be that but isn't maintained anymore, and was superseded by wxArt2D most of which seems to be abandoned, e.g. the examples page has no images, the source tab of the soureforge page is empty, etc. Or is there an external library that can create pixel data that wxImage can make use of or something? I'm trying to render some graphs, and I don't want to use GL because switching GL contexts is a lot of overhead.
When working in Qt I had this:
Code: Select all
int main(int argc, char * argv[])
{
Engine::InitializeThreads(getLanguageCode(QLocale()));
QApplication a(argc, argv);
MainWindow w;
Engine::SynchronizeThreads();
w.show();
int i = a.exec();
Engine::JoinThreads();
return i;
}
Thanks for any help!