Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Laval B

Member Since 30 Jul 2010
Offline Last Active Yesterday, 05:37 AM

Posts I've Made

In Topic: Codebase with multiple back-ends

23 December 2014 - 04:17 PM

I think a simple but somehow less manageable approach is just to use template and typedef:

 

In some way that's pretty much what i do ... I put the various implementations into different files (.h and .cpp) and i use include files that include the proper headers for the platform/configuration i want to compile. It's less messy that way because there isn't a bunch of conditional ifdef all over the place. It's not necessarily possible nor desirable to put all the code inline.

 

The real problem is not the code but the configurations and the project/make file that need to be setup on a per configuration and a per platform, basis. Remember that everything isn't just a matter of code, like linker setups and libraty paths.


In Topic: Codebase with multiple back-ends

20 December 2014 - 11:49 AM

... use something like CMake to manage your project files.

 

I was planning to take a look at CMake. I've used it only to compile libraries so far and it worked great. For what i know, it generates an ide specific project/make file for you platform. It could probably generate project/make files for all the supported configurations or just thos you want (i guess). It looks like a great idea but is there good tools to manage the CMakeLists.txt file as you develop and add things on specific configurations ?


In Topic: Qt and OpenGL

28 November 2013 - 09:43 AM

Unfortunately I don't think I can be of more help then. My experience is primarily with QtQuick, the application uses no widgets (just a top level window and the contained QtQuick UI). You might have better luck producing a minimum code sample that shows the problem and posting it on a Qt-dedicated forum like over at qt-project.org.

 

Thank you very much for your help, it's appreciated.

 

As a complementary info : if i remove the docking windows to keep only the GLWidget, it is flickering when i resize the app. If i compile and run the examples, they are flickering too. They were not with the other Qt version.

 

I'll follow your advice and post the code on a Qt forum.


In Topic: Qt and OpenGL

28 November 2013 - 09:33 AM


You are rendering in the update thread. At least when using QtQuick the thread that is doing all the rendering (and is the only one allowed to) is always a different thread from the normal update thread.

 

The only place i'm calling opengl functions are in initializeGL, paintGL and resizeGL as recomended in the documentation.

 

 

 


You are polluting the GL state. At least QtQuick is a bit picky about anyone changing the GL state. Make sure any buffers bound (especially vertex and index buffer) are restored to their orginal value when you are done rendering. Also, the cull mode (whether or not it is enabled and the cull face) need to be preserved. Saving these states allowed me to integrate the rather monolithic renderer I have to work with with Qt.

 

I'm not sure when i need to save and restore these states. Everything is flickering when i'm resizing something, even the scrollbars of the docking windows. The problem is related to the OpenGL Widget though since it doesn't happen if i replace it with a standard widget like QTextEditor.


In Topic: Qt and OpenGL

28 November 2013 - 08:57 AM

I'm pretty sure you are using the OpenGL ES emulator version. To be sure check if there is a libEGL.dll and libGLESv2.dll in your bin directory with the rest of the Qt DLLs.

 

Yes, these dll are present. I have downloaded the OpenGL version. It works but now when i resize the docking windows, or the application for that matter, everything is flickering alot whether or not i am running in debug or in release. Before, there was only a small flicker in debug mode.


PARTNERS