sam.price Posted May 16, 2016 Posted May 16, 2016 Hi, I am trying to set up parameters about the window such as title, icon, and position and I am finding that I need to create an App class. Right now after initializing the engine, it will display a window with the default settings then it switches the settings and position of the window. I would like to be able to derive from AppWindow as opposed to reimplementing it from scratch. Do I need to derive from one from D3D11AppWindow and one from GLAppWindow? Is this possible? Any suggestions?
silent Posted May 17, 2016 Posted May 17, 2016 Hi Sam, If you want to change the icon, title and position of the window you don't need to write custom App for that. Just use already availble methods from API after engine init() or in SystemLogic::init(), such as: int setTitle(const char * title) int setPosition(int x, int y) int setIcon(uchar[] data) Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
sam.price Posted May 17, 2016 Author Posted May 17, 2016 Hi Silent, Thanks for responding. We are doing that currently, but that is causing the window to appear with default settings, then moving and having its settings changed after half a second or so. We want our settings to be applied before the window is displayed. Engine init displays a window immediately and we want to set those things before that. Is there a way to not display the window until after we set those settings?
silent Posted May 18, 2016 Posted May 18, 2016 Hi Sam, I'm afraid, with default App it is expected behavior. You can change it only by writing your own App. As an example, you can check all the App plugins code. Also, you can check the Qt integration sample (just create new project via SDK Browser and select C++ (Qmake) type). We also have SDL integration sample (but it's not added into SDK Browser yet), please check the <SDK_Install_Dir>/source/app/main_sdl directory. Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
Recommended Posts