[Development] QOpenGLContext::currentContext()->functions()->glCreateShader(GL_VERTEX_SHADER) returns 0

Dov Grobgeld dov.grobgeld at gmail.com
Sat Jan 24 17:34:47 CET 2015


I'm trying to write a cross platform OpenGL application. It is currently
working both on Linux and on Windows when I'm working at the actual
computer, but it fails when trying to run the application under the remote
desktop rdp protocol from Windows to Linux. I traced down the failure to
the fact that:

QOpenGLContext::currentContext()->functions()
  ->glCreateShader(GL_VERTEX_SHADER)

returns 0, which indicates that the current context was not able to create
a shader. But according to the blog entry at:

http://blog.qt.digia.com/blog/2014/11/27/qt-weekly-21-dynamic-opengl-implementation-loading-in-qt-5-4/

the following fallback chain should fallback all the way to a software
renderer if no OpenGL or DirectX (through ANGLE) is supported:


   1. Try opengl32 and check if OpenGL 2.0 functions are available.
   2. If this fails, try ANGLE.
   3. If initialization fails either due to missing ANGLE libraries or some
   other reason, try opengl32sw.dll. In practice this will be a software
   rasterizer based implementation. To make it easy to get started, a
   pre-built version of Mesa llvmpipe <http://www.mesa3d.org/llvmpipe.html>
   is bundled with the binary packages of Qt 5.4.

I tried the above program with both the OpenGL and the non-open gl prebuild
Qt-5.4 binary packages, but returned 0 under the remote desktop.

Am I mistaken to assume that an OpenGL program will work (albeit slow!)
under remote desktop? If not how can I trace down the failure?

The above blog entry also discusses logging for tracing failures. But there
is no explanation for where this logging is collected, how it is read, and
interpreted.

Thankful for any help, as it will save me the need to physically access a
windows machine for my Qt OpenGL development!

Regards,

Dov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20150124/c6e904ed/attachment.html>


More information about the Development mailing list