[Android-development] Legacy opengl code issue

timday timday at bottlenose.demon.co.uk
Mon May 27 15:05:00 CEST 2019


OK I never found the need to include anything other than
QOpenGLFunctions which seems to usefully define a minimal subset which
works on GL and GLES and was good enough for my uncomplicated purposes.
   
I just grepped through the qopenglfunctions_3_0.h file and was a bit
surprised to see it does define a glBegin member amongst other things
in a section commented "// OpenGL 1.0 deprecated functions".  I'd have
to admit I never quite understood how/when those versioned
QOpenGLFunctions classes were supposed to be used, but I note there's a
QOpenGLFunctions_3_3_Core which doesn't define glBegin and the like,
and is maybe supposed to be the subset common to GL and GLES?

Tim

On Mon, 2019-05-27 at 08:57 +0530, Sujan Dasmahapatra wrote:
> Ya Tim I tried for the past few days, and conclude that I need to re-
> write the opengl calls to with shader program and VBOs. No other
> alternative. Using clean opengl in android hardware is more than
> impossible. Though QOpenGLFunctions_3_0.h has all old opengl APIs but
> android doesn't support them.
> 
> Legacy code can be used with mingw version of Qt. But android version
> will not support these functions. And GLES API set doesn't have clean
> OpenGL functions they're all shader based.
> 
> Still if any one has got any idea of legacy code if can be built with
> android do let me know. I am anyway started porting the app for
> shader based. Thanks a lot for your reply.
> 
> Best Regards
> Sujan
> 
> 
> On Mon, 27 May 2019 at 01:52, timday <timday at bottlenose.demon.co.uk>
> wrote:
> > 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
> > 
> 
> _______________________________________________
> Android-development mailing list
> Android-development at qt-project.org
> https://lists.qt-project.org/listinfo/android-development


More information about the Android-development mailing list