[Android-development] Legacy opengl code issue

Sujan Dasmahapatra yellowlemontree0821 at gmail.com
Fri Jun 7 17:04:36 CEST 2019


Hi All

About this issue, I am doing with non-legacy way. As its very difficult.
But I'm successful in converting the code.

Thanks a lot Tim.

On Wed, May 29, 2019, 12:41 PM Sujan Dasmahapatra <
yellowlemontree0821 at gmail.com> wrote:

>     QOpenGLFunctions_3_0* funcs = 0;
>
>     funcs = QOpenGLContext::currentContext()->versionFunctions<QOpenGLFunctions_3_0>();
>
>     funcs->initializeOpenGLFunctions();
>
>
>     funcs->glCallList(m_object);
>
> I am still in search of a solution of using old opengl code in new android version of Qt. In the above way snippet I am trying to use
>
> glCallList, but I am getting error before even building, for QOpenGLFunctions_3_0
>
> error: unknwon type name QOpenGLFunctions_3_0, it is not building. I included the file QOpenGLFunctions_3_0 header.
>
> When I goto qopenglfunctions_3_0.h header I see QOpenGLFunctions_3_0 class is greyed out  I think its disable.
>
>
> Is there anything I am missing for this. Any suggestions highly appreciated.
>
>
>
>
> Best Regards
> Sujan
>
>
> On Mon, 27 May 2019 at 21:39, Sujan Dasmahapatra <
> yellowlemontree0821 at gmail.com> wrote:
>
>> qopenglfunctions_3_0.h I tried to include this header, and tried to
>> compile with android version of Qt 5.9.1, but it gives error, driver error
>> it looks like. I don't even find the necessary library and headers in the
>> Qt folder. I am still searching it, one thing I understood if it has to
>> work, then this is the only way it can happen by including
>> qopenglfunctions_3_0.h this header and QOpenGLFunctions.
>>
>> Thanks for your advise. I will update you if its successful.
>>
>> Best Regards
>> Sujan
>>
>>
>> On Mon, 27 May 2019 at 18:35, timday <timday at bottlenose.demon.co.uk>
>> wrote:
>>
>>> 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
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/android-development/attachments/20190607/f60bde3c/attachment.html>


More information about the Android-development mailing list