Qt over game
-
Hi everyone!
This is my first post, so please be gentle with me! :p
I couldn't decide wheter this fitted in the game dev section or in the general section, so I put it here.
Please mods place it in the correct place if needed.I am planning to make a tool for players of a certain MMORPG (Entropia Universe). Before I start, I'd like to ask if it is possible to draw Qt windows on top of the CryEngine 2?
Anyone knows how to do this? Or is it doable with just the "on top" flag (I doubt that)?Detecting the presence of the client won't be a problem I guess, just to draw my app over the renderer of the CE2....
Anyone can help?
Thx in advance :)
-
Hi Radek,
I don't know what CryEngine2 does, but on windows, the top level Qt widget is a standard Window, so you can do everything with it, that you can do with a window. If the top level window is an OPenGL window, it will draw like OpenGL.
Does that help you? Otherwise, I would suggest to make a small test for that.
-
Hi Dobaz,
Sorry, nothing so far, I just didn't have the time. I had to change my computer.
There is hope I can test something soon, I just re-installed Qt on my new comp yesterday evening ;-)Can't wait to test the new Creator ^__^
First step would be to grab the game's window handler to be able to paint over it (that's the way I'll begin testing).
As I'm newbie in this matter I may be mistaken though.....will post as soon as I can.
I'm still open for any advice/thoughts :)
Good luck!
-
Radek,
thanks for your reply. So now I'm eager too that you test your new Creator! I only found things on having DirectX inside a Qt window. Doesn't help much. If your test works, it would be awsome.
If I find something else, I'll let you know.
Good luck too!
-
Hi there!
I tried a bit yesterday evening.... can't seem to be able to dock a widget to another app...
Could anyone please enlighten me if one knows a way to do it....
Should I play at WINAPI-level? I can get the HWND of the app I want to dock my widget into but what next? I can't get wy widget to show on another app, even if it's not a directx renderer.Should I use SetParent() and then a collection of other functions to adjust my app? (I don't feel it good :s ).
Desperate thx :)
Edit: Found something interresting: QWinMigrate, maybe it could help me, I just built the ".pro", excluding the MFC part as explained int the reame
I'll try to achieve something tonight, stay tuned! :) -
Hi Radek,
Just to share my experience of managing 3D windows in Qt : it is really not straight forward... I wanted to include an OpenGL window (core profile) managed by an other lib (SDL) as QWidget and finally gave up... 3D windows are really managed in a special way by OS, especially direct3D (compared to OGL which seems relatively well managed by Qt API).
So if you wanted a fast and working soution, may be your problem is "ill posed" or I misunderstood what you wanted...
Hope that someone more skillful than me could unjam you!
-
Hi tomato,
Thanks for the reply.
You misunderstood my problem I think. I don't want to embed a D3D window in my QT app, but the other way. I want to display my app as if it was included in the D3D window. Somehow dock it into the game.
The purpose is to have a tool when you're in fullscreen mode, to avoid alt-tabbing.I hope it's clearer this way. :-)
-
Time for a summary of how things are going so far....
BAD! :(((Tomato, you understood well my problem in the first place.... yes I wanted a fast solution. And no it doesn't exist! -__-
After a gazillion hours of research on the internet, I finally (I'm a stubborn one :p ) came to the conclusion that it won't be easy game.
I might have found a guideline though.
For what I want to do (display something over a full-screen DirectX renderer), I need to go through DirectX itself, and use a technique known as hooking.... far from "piece of cake"!!! And then display an overlay on top of the game.
There are some available example apps that work like this: X-Fire, Steam, Mumble. The latter being opensource. (the overlay part of the source is scary!)Being a stubborn-one(sorry for repeating myself), and for the sake of science and public common knowledge, I won't give up. =)
First stage will be to manage to use directX in QtCreator.
I'll keep posting for each stage I accomplish that seems important to me.
Now back to work.
-
Hello Radek,
It's funny I just (few minute ago) got to the same conclusion. I called a Qt consultants and they're not able to help me on that one. So there's no way I will make it work by myself since I'm not as experienced.
The only solution is to go through DirectX. On my side though I am thinking of developing the whole thing in VS with DirectX and get some help with it because I know 0 about it. Not sure yet. Anyways thanks for the information, I will keep an eye on this thread to see how are things and even encourage you!
Good luck!
-
Hey Dobaz!
Thx for the encouragements, and good luck on your directx journey! May you find your way quickly! :-)
I've seen your thread on the forum, you can post updates too on your advancement, or some screenshot of your results if you have no time for writing ;)
I'm not in a hurry, so I can take the time to learn by myself (developping this for my pleasure).
Don't expect me to finish this in one week...there will be times with updates and times without a word, as the number of variables coming into account for my free time are numerous ;pCheers!
-
Hi folks!
Time for a little heads-up as I got awesome news! (I'm a little excited actually)
After some Internet digging I managed to implement a custom widget derived from QWidget that displays a DirectX renderer, built with QtCreator and MingW! Hoorray! :-p
This opens the path to victory as I now have the possibility to use DirectX. The DX version used is now DX9 as it assures the best compatibility (WinXP to 7).
More details this week-end when I have some time to write a longer post. =)
Stay tuned!
-
Hi @Radek i know it's a little bit old this topic, but hopefully you found a solution and can share it with us. I'm currently working on an overlay, but it does not work to be painted over an fullscreen game