OpenGL ES 2 support

Bug #1316402 reported by bredfern
30
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Mixxx
Confirmed
Wishlist
Unassigned
mixxx (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Currently only desktop opengl is supported for the waveform rendering, but the odroid only supports opengl es2 so running a binary of mixxx segfaults on the wave render when run from an apt-get into the odroid u3 version of Xubuntu 13..10, while attempting to build from source goes great until you hit the waveform rendering code at which point we fail on the build of the shader code.

This would help to also make mixxx portable to android/qt as android only supports opengl es2.

Tags: waveform
Revision history for this message
bredfern (brianwredfern) wrote :

The matrix math helpers that are part of the desktop opengl render library and stripped out of opengl es2. Most of the code just builds with es2 and its compatible, I'm going to look for an es2 support library that brings the matrix math helpers back in because its a common problem porting from desktop opengl to es2.

description: updated
Revision history for this message
Daniel Schürmann (daschuer) wrote :

Hi bredfern,

Thank you very much for offering your work.
Please assign the bug to yourself, if you are working on a fix.

This link may be helpful:
http://www.mixxx.org/wiki/doku.php/bugfix_workflow

Kind regards,

Daniel

Changed in mixxx:
importance: Undecided → Wishlist
Revision history for this message
bredfern (brianwredfern) wrote :

I forked a copy on github I'm going to have to tweak the shader code and do a DIY pipeline for es2.

Changed in mixxx:
assignee: nobody → bredfern (brianwredfern)
Logan Rosen (logan)
tags: added: ftbfs
Changed in mixxx (Ubuntu):
status: New → Triaged
Revision history for this message
Logan Rosen (logan) wrote :

This is causing an FTBFS on armhf in Ubuntu.

Changed in mixxx (Ubuntu):
importance: Undecided → High
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

@Logan -- do you have a link to the build failures? We should at least be able to make code that uses the OpenGL headers dependent on detection of OpenGL.

Revision history for this message
Logan Rosen (logan) wrote :
Revision history for this message
Daniel Schürmann (daschuer) wrote :

Here some useful info:
http://stackoverflow.com/questions/16609825/matrix-mode-for-2d-graphics-in-opengl-es-2

It seams that we need new waveforms to have the benefit of ES2.
For now, we can just disable openGL waveform parts in the Mixxx source codebase if
QT_OPENGL_ES_1 or QT_OPENGL_ES_2 is defined.

Here the header selection from the Qt code:

#if defined(Q_WS_MAC)
# include <OpenGL/gl.h>
#elif defined(QT_OPENGL_ES_1)
# if defined(Q_OS_MAC)
# include <OpenGLES/ES1/gl.h>
# else
# include <GLES/gl.h>
# endif
# ifndef GL_DOUBLE
# define GL_DOUBLE GL_FLOAT
# endif
# ifndef GLdouble
typedef GLfloat GLdouble;
# endif
#elif defined(QT_OPENGL_ES_2)
# if defined(Q_OS_MAC)
# include <OpenGLES/ES2/gl.h>
# else
# include <GLES2/gl2.h>
# endif
# ifndef GL_DOUBLE
# define GL_DOUBLE GL_FLOAT
# endif
# ifndef GLdouble
typedef GLfloat GLdouble;
# endif
#else
# include <GL/gl.h> <- this is active on Linux builds
#endif

Revision history for this message
James Evans (bristoljim) wrote :

Is anyone working on OpenGL ES support in Mixxx at present? I *could* try and help but I know nothing about OpenGL and my C skills are more than rusty. I would much rather "encourage" someone who knows what they're doing to have a go!

Further, is this a duplicate of https://bugs.launchpad.net/mixxx/+bug/1401283 and should we just have 1 'bug' for tracking this?

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mixxx - 2.0.0~dfsg-3

---------------
mixxx (2.0.0~dfsg-3) unstable; urgency=medium

  * Team upload.
  * debian/rules:
    - Use flags suggested by upstream: build=release, virtualize=0,
      localecompare=1, qt_sqlite_plugin=0.
    - No longer build xpm, no longer needed.
    - Really support parallel builds.
  * debian/{rules,control}: Revert to Qt 4 as suggested by upstream.

 -- Sebastian Ramacher <email address hidden> Tue, 26 Jan 2016 19:26:58 +0100

Changed in mixxx (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Be (be.ing) wrote :
Revision history for this message
Owen Williams (ywwg) wrote :

I believe that old CL only made it so that Mixxx compiles on machines with opengl ES. None of the waveforms were rewritten to actually support that system. It would be really nice to create a GLES-compatible waveform renderer

RJ Skerry-Ryan (rryan)
Changed in mixxx:
assignee: bredfern (brianwredfern) → nobody
tags: added: waveform
removed: ftbfs
RJ Skerry-Ryan (rryan)
Changed in mixxx:
status: New → Confirmed
Revision history for this message
aart (amvanbaren) wrote :

@Owen, that's correct. It disables some incompatible OpenGL code, so that Mixxx compiles and runs on SoC's like the Odroid C1.
I believe some of the waveform renderers actually worked (there are multiple waveform renderer implementations), but I'm not sure. It's a long time ago.

Revision history for this message
Be (be.ing) wrote :

I think CPU rendering should work, but I don't know what the performance is like on SBCs.

Revision history for this message
bredfern (brianwredfern) wrote : Re: [Bug 1316402] Re: OpenGL ES 2 support

The current version of mixxx has been working fine for me on the pi3b+ to
the point where its completely stable and I see waveforms, CPU rendering
has been working since the latest version without any problems.

On Sat, Sep 22, 2018 at 9:19 AM Be <email address hidden> wrote:

> I think CPU rendering should work, but I don't know what the performance
> is like on SBCs.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1316402
>
> Title:
> OpenGL ES 2 support
>
> Status in Mixxx:
> Confirmed
> Status in mixxx package in Ubuntu:
> Fix Released
>
> Bug description:
> Currently only desktop opengl is supported for the waveform rendering,
> but the odroid only supports opengl es2 so running a binary of mixxx
> segfaults on the wave render when run from an apt-get into the odroid
> u3 version of Xubuntu 13..10, while attempting to build from source
> goes great until you hit the waveform rendering code at which point we
> fail on the build of the shader code.
>
> This would help to also make mixxx portable to android/qt as android
> only supports opengl es2.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/mixxx/+bug/1316402/+subscriptions
>

Revision history for this message
bredfern (brianwredfern) wrote :

I would definitely consider this a closed bug at this point, the pi3 b+ has
enough horsepower now between the hardware as well as software improvements
to run mixxx as expected on a stock pi3 b+ raspbian setup.

On Sat, Sep 22, 2018 at 12:41 PM Brian Redfern <email address hidden>
wrote:

> The current version of mixxx has been working fine for me on the pi3b+ to
> the point where its completely stable and I see waveforms, CPU rendering
> has been working since the latest version without any problems.
>
> On Sat, Sep 22, 2018 at 9:19 AM Be <email address hidden> wrote:
>
>> I think CPU rendering should work, but I don't know what the performance
>> is like on SBCs.
>>
>> --
>> You received this bug notification because you are subscribed to the bug
>> report.
>> https://bugs.launchpad.net/bugs/1316402
>>
>> Title:
>> OpenGL ES 2 support
>>
>> Status in Mixxx:
>> Confirmed
>> Status in mixxx package in Ubuntu:
>> Fix Released
>>
>> Bug description:
>> Currently only desktop opengl is supported for the waveform rendering,
>> but the odroid only supports opengl es2 so running a binary of mixxx
>> segfaults on the wave render when run from an apt-get into the odroid
>> u3 version of Xubuntu 13..10, while attempting to build from source
>> goes great until you hit the waveform rendering code at which point we
>> fail on the build of the shader code.
>>
>> This would help to also make mixxx portable to android/qt as android
>> only supports opengl es2.
>>
>> To manage notifications about this bug go to:
>> https://bugs.launchpad.net/mixxx/+bug/1316402/+subscriptions
>>
>

Revision history for this message
Be (be.ing) wrote :

That's good to know, thanks. I think it would still be helpful to write a new waveform renderer with GLES, but not as important knowing that CPU rendering works okay.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

I believe a fix for this is required for QML-based UIs, since I believe the whole QML UI is rendered with an OpenGL ES 2-only context. Software rendering will also do a number on your battery when a much more efficient route is available :).

Revision history for this message
Daniel Schürmann (daschuer) wrote :

The first step was done here:
https://github.com/mixxxdj/mixxx/pull/2088

With QT5 the QT waveforms and Spinnies are already GLES if such a renderer is used.
I think we can easily turn the software waveform into GLES by putting the code int a QGlWidget like the Qt types.

Changed in mixxx:
milestone: none → 2.3.0
Be (be.ing)
Changed in mixxx:
milestone: 2.3.0 → none
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/7461

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.