Qt 5.9, OpenGL, mesa libraries - black screen
I have finally successfully compiled a Qt app (C++) using OpenGL on a CentOS 7 machine. The application was originally developed for Windows.
I have an OpenGL scene that is showing a black screen. It works if I compile the project with the Windows version of Qt in a Windows environment.
All controls and functionalities are working except I cannot see the result on the OpenGL scene.
I am using the Mesa libraries on a CentOS system:
glxinfo | grep vendor server glx vendor string: SGI client glx vendor string: Mesa Project and SGI OpenGL vendor string: VMware, Inc.
and I can see the that 3D acceleration is on:
glxinfo | grep rendering direct rendering: Yes
Thank you for your help,
Can you run glgears or any other openGL app ?
Have you tried outside of virtual machine?
the glxgears works:
[dcappiello@localhost ~]$ glxgears 2423 frames in 5.0 seconds = 484.186 FPS 2579 frames in 5.0 seconds = 515.722 FPS 2718 frames in 5.0 seconds = 543.542 FPS 2176 frames in 5.0 seconds = 435.088 FPS
Ok so at least some openGL is available
Maybe its the shader revision.
Do you run it in Creator or outside ?
Also does the
OpenGL Window Example
I am running my project inside the Creator.
I can confirm that the OpenGL Window Example is not working, I am getting the following error:
Project ERROR: Unknown module(s) in QT: axserver
You are on something :)
Sorry, ignore my previous comment.
I was running the OpenGL Example (ActiveQt).
The project OpenGL Window Example Works.
I can use it to compare with my project to see what is different.
I will keep you posted.
I found what the problem was. My application needs OpenGL 4. The problem is that I was running and testing my app on a VirtualBox machine that cannot use my computer graphic card. Unfortunately, I will need to install Qt and app on a proper CentOS 7 machine. MRJJ, thank you for your help. Dino
The OpenGL drivers in the VirtualBox Guest Additions are limited to OpenGL 2.1. as far as i know.