[Android-development] Legacy opengl code issue

timday timday at bottlenose.demon.co.uk
Sun May 26 22:22:43 CEST 2019


On Sun, 2019-05-26 at 23:31 +0530, Sujan Dasmahapatra wrote:
> I am using Qt 5.9.1 for android. My opengl code is legacy code where
> many opengl  API's are obsolete in it. Like glBeging to glCallList
> etc.
> 
> how can I make it work with this version of Qt.? Do I need to
> configure it with new set of source of Qt. 
> 
> Any suggestions highly appreciated.

To get it to work on Android you'll have to do the work of porting it
to the OpenGL ES APIs (probably including getting familiar with vertex
buffers and GL shaders too, if the legacy code relies on the old "fixed
function pipeline" model).  The GLES API is all that the Android (and
iPhone) graphics HW will support.

I went through such an exercise with the graphics engine of a desktop
application some years ago... and the desktop application benefited
greatly from being upgraded to the "more modern" API too.

Qt provides some useful helpers - QOpenGLFunctions will keep you honest
about which API calls you can use and things like QOpenGLShaderProgram
are convenient.

(I suppose it's not impossible someone somewhere has done a library
that somehow translates oldschool OpenGL calls into GLES... I've never
looked for one and I doubt it'd be efficient).

Tim


More information about the Android-development mailing list