Using the 3dgs engine sdk with Qt Creator

Posted By: Aku_Aku

Using the 3dgs engine sdk with Qt Creator - 08/23/16 13:36

I struggled to use an IDE as a first goal, with GUI builder as a second goal, that can cooperate with 3DGS.
I tried basicly the Eclipse with Cygwin and alternated with MinGW. I was able the sample program get to work.

At the second goal, i wasn't able to create an environment that works successful.
That is the most possible, my knowledge was poor.
I remark, i used Google extensively, and i made approximately twenty or more variations.
As a GUI builder i tried WxWidgets, the result was: tragic.
As a GUI builder i tried GTK, the result was: weak. I couldn't get a working executable.

So, i gave up everything, and i began from the scratch.
Finally, i have found Qt. It works! Together with 3DGS!
Unfortunately, have to throw up using Eclipse, although its features are great.
But this time it seems to me, Qt Creator has enough abilities to create well working projects for using the 3DGS engine.
Posted By: Quad

Re: Using the 3dgs engine sdk with Qt Creator - 08/24/16 00:07

Qt creator should be a c++ ide. It should be giving you options to add include and library directories and a tool to add a list of libraries you want to link.

Gamestudio sdk is fairly simple to setup regardless of the ide you are using. Steps are as follows:
Add sdk_engine folder as both an include directory and a library directory.
Add acknex.lib to linker settings.

that's it.

Also what do you want to achieve with all this gui libraries and gamestudio sdk? Why not just use visual studio 2015 community(which is free)? Gamestudio is windows only anyway.
Posted By: Aku_Aku

Re: Using the 3dgs engine sdk with Qt Creator - 08/24/16 08:37

I want to create a GUI builder program for 3DGS applications. And why do i don't use Qt, if it is so simple?

This time i have only one problem, i got the message: Error E1241: Can't open DirectX device,
when i try to bind the engine to a widget on the Qt window.

I'm afraid the answer will not be so quick, this topic is visited no so frequently.

Anyway thanks for your interest and help.

Playing a bit with the code, the error was eliminated.
But now, i can't close the engine with engine_close().
After the closing engine_status gives back 0, that means it is closed.
But i can see it in the tasklist in task manager.
What could be the reason?
Posted By: Quad

Re: Using the 3dgs engine sdk with Qt Creator - 08/26/16 10:31

I am not sure how you are using the engine. Do you run acknex.exe seperately from your qt gui app?

But i am guessing you are using engine sdk since you can still call engine_status. i mean if you are using engine sdk and starting engine with engine_open and closing with engine_close and can still call engine_status then you also have to somehow end your qt app/loop for your process to finish. Also i do not know to which extent you plan to use qt bu i am not sure if qt is the way to go. At the very least try to merge qt message loop and engine input/message loop. And try to sync engine frames with qt. I tried qt once for a editor like gui but it in the eay i used it it required lots of sync/glue code between engine and qt and it became a real mess real quick. I think in the context of a game engine/realtime frame based apps a more immediate mode gui approach is suited better. Unity editor is such an app that uses immediate mode gui.
Posted By: Ch40zzC0d3r

Re: Using the 3dgs engine sdk with Qt Creator - 08/26/16 10:33

You have to exit the process manually using exit() or any windows apis like ExitProcess(0)
engine_close closes the engine but not the "parent" process nor its other threads. Its only a DLL in this case
Posted By: Aku_Aku

Re: Using the 3dgs engine sdk with Qt Creator - 09/10/16 17:43

Before i try your proposal, i have to solve the following problem.
I got this error message:
Quote:
error: anachronistic old-style base class initializer [-fpermissive]
#define v(a) (*ev->a) // uses ENGINE_VARS *ev struct


Does anybody have a solution for this?
Thanks in advance.
Posted By: Quad

Re: Using the 3dgs engine sdk with Qt Creator - 09/11/16 00:53

are you trying to compile with gcc g++?
Posted By: Aku_Aku

Re: Using the 3dgs engine sdk with Qt Creator - 09/11/16 10:16

Yes i do. I am sorry, i forgot to mention that (although i opened this topic with mentioned i am using Qt).
Posted By: Ch40zzC0d3r

Re: Using the 3dgs engine sdk with Qt Creator - 09/11/16 10:47

Qt can use any compiler installed on the system.
Im usually using msvc with it.

Anyways, this error usually pops up when you use a class variable name which is preserved by the compiler.
You should really drop g++ and simply use msvc, clang or intels compiler
Posted By: Aku_Aku

Re: Using the 3dgs engine sdk with Qt Creator - 09/11/16 11:32

Thanks for the will to help, but i think you are wrong.
If i try to use a preserved word, the message would say that: you try to use a preserved word.
Instead of this, the compiler states this error message:
Quote:
anachronistic old-style base class initializer


So, i suspect the root of problem is far away from the preserved word usage, so i can't see any reason to drop qt.

For the record: this is the second proprosal to drop qt/gcc in this really tiny topic. I am curious how much time will happen this thing.
Posted By: Aku_Aku

Re: Using the 3dgs engine sdk with Qt Creator - 09/11/16 12:10

Finally i fixed my code, and eliminated the "anachronistic old-style base class initializer" problem.

Now, i am back to the proper engine closing when the application stopped by clicking on its close button.
Posted By: Aku_Aku

Re: Using the 3dgs engine sdk with Qt Creator - 09/12/16 21:00

Finally i fixed my code.
Now i have a working application with its own window with widgets.
a. one groupbox that holds the engine window.
b. one button that starts the engine.
c. one button that stops the engine.
At last but not least, when the window X button senses a click,
the application closes the engine and the application itself.
No more task remains in the tasklist.
Thanks all the helps to everybody.

If anybody is interested in how to use Qt combined with Gamestudio, i can describe here my solution.
© 2024 lite-C Forums