right way to make editor for graphic system like an engine

Started by
5 comments, last by Alundra 7 years ago

hi. I have some knowledge on directx and opengl. im trying to make editor for my graphical system. I don't know what can be a good tool to do that. for example is it possible to use windows forms or other microsft templates to make that (as I searched its possible to render output to some winform controls) or that can cause limitations and that is not good. I want to know which tools most engines like unity unreal and use to make their editor.

thank you for helping

Advertisement

It is common to use Qt with OpenGL and shared contexts, as Qt makes it easy to create fancy windows and is cross-platform.


L. Spiro

I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid

You should heavily use Qt for tools because there is just no other solid solution and it's why every big studios still use Qt or switch to Qt.
You can bind OpenGL or Direct3D easily, meaning cross platform and powerful tools.
You simply have to use winId() in QWidget to get the window handle, then connect a QTimer which will render at a frequency or use 0 to not limit the timer.
Don't forget to stop the timer if the widget is hidden or closed to win performance if you use multiple rendering window.
For the resize, you can use a QTimer to avoid to resize each time the window resize but only when you stop to resize for example 1s.
It's needed because you don't have a Resized event, so you have to cheat here.
If you use multiple rendering window, you can make a custom QWidget named "IRenderWidget" which contains a virtual OnUpdateOneFrame().
If you only use OpenGL, Qt already has one QWidget for you named "QOpenGLWidget", which can also be used to have faster rendering on QGraphicsView.
In case you use QOpenGLWidget on QGraphicsView, you have to do the clear of the widget in drawBackground using glClear.

as I searched there are lots of qt versions there. can you give some information which versio is right one?

for example:

qt for windows mingw 4.8.2

qt for windows mingw vs2010 opengl

// // // 2013 opengl

qt creator for windows

and ......

Get the most recent package(s) for the compiler(s) and platform(s) you want to support.


L. Spiro

I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid

An alternative approach (with different positives and negatives) is to use a Immediate Mode GUI library such as this one: https://github.com/ocornut/imgui
Here are a couple of posts that cover both approaches:
Pro Qt: https://deplinenoise.wordpress.com/2017/03/05/why-qt-and-not-imgui/
Pro IMGUI: https://gist.github.com/bkaradzic/853fd21a15542e0ec96f7268150f1b62

FWIW I really like the IMGUI approach since there's so little friction to creating new bits of UI. However I use it for my own stuff so I'd potentially have to re-evaluate if I was making a tool that was to be worked on/in by a larger team of coders. That said, Unity also uses an IMGUI approach.

T

I would recommend IMGUI for debug tool but not for a real full editor.

This topic is closed to new replies.

Advertisement