Hacker News new | ask | show | jobs
by ensiferum 1561 days ago
Hi, you're absolutely correct. Tooling and the whole content pipeline is super important.

I chose Qt because I'm already very familiar with it and I know that it can do so much stuff out of the box and I want the editor to work as any other app as much as possible, i.e. tooltips, shortcuts, cut/copy/paste keyboard focus etc.

So everything works fine (as long as you know Qt's quirks) except that:

OpenGL support is kind of a mess. You have QOpenGLWidget, QGLWidget,QOpenGLWindow, QGLwindow which can all support OpenGL rendering. The problem is that while QOpenGLWidget works nicely with the rest of the toolkit ( context menus etc) the Performance is very suboptimal. I found it to be an magnitude of order worse than just using a window. I'm sure there's something else going other than just FBO overhead.

Another problem related to this but not unique to Qt is how to render to multiple window surfaces but to keep to a nice framerate. If you use vsync on each surface your framerate will be your display sync divided by the # of your surfaces. If you don't vsync then you're running a busy loop and burn cycles in a busy loop. I've tried many ways to do this nicely and haven't found a perfect solution yet. Would be very happy to hear some suggestions. Currently I'm just adding a little thread delay to cap the CPU use but this creates little hiccups in animation sometimes.

1 comments

Have you tried Qt 3D or Qt RHI for your woes ? I had the same experience with QOpenGLWidget, there are a few bug reports open about its performance especially with multiple viewports. See also this thread on the mailing list: https://lists.qt-project.org/pipermail/interest/2020-Decembe...
Thanks, that link seems interesting and relevant!

Well, ... the Qt3D is a higher level framework that isn't really relevant to the stuff I'm doing considering that I'm basically running my own "framework", i.e. my game engine that renders to my rendering surface.

In my use case what I really need is just to have Qt provide me a rendering surface with good performance (and ideally with working integration with the rest of the widget system) and then get out of the way.