es-opengl support (UDOO, raspberry pi)

Bug #1401283 reported by Ramon Schepers
This bug report is a duplicate of:  Bug #1316402: OpenGL ES 2 support. Edit Remove
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mixxx
Confirmed
Wishlist
Unassigned

Bug Description

(this is more like a feature request, but i got pointed to here on the mixxx forums: http://www.mixxx.org/forums/viewtopic.php?f=3&t=6206&p=23233&hilit=udoo#p23233 )

Some (if not most) ARM based SoC's have es-opengl instead of the regular opengl.
Mixxx doesn't work on es-opengl based SoC's, resulting in closing the application on startup.
It would be nice to have support for es-opengl based devices (like the udoo for example) to minimize the hardware setup, as these devices can be really small, and extend usability of mixxx.

yours, ramon schepers.

Tags: es-opengl udoo
Revision history for this message
Daniel Schürmann (daschuer) wrote :

Hi Ramon,

IMHO Mixxx should work without OpenGL in place.
By default it tries to use OpenGL for waveform and spinnies.

You may try to start Mixxx without waeforms, by
editing

[Waveform]
WaveformType 0

[Spinny1]
show_spinny 0

[Spinny2]
show_spinny 0

in the ~/.mixxx/mixxx.cfg fiele

But maybe Mixxx still segfaults because it expects OpenGL or nothing.

Are you able produce a backtrace?
http://mixxx.org/wiki/doku.php/creating_backtraces

From the technical point of view it should be possible to support OpenGL ES
See: http://qt-project.org/doc/qt-4.8/opengl-cube.html

Kind regards,

Daniel

Changed in mixxx:
status: New → Confirmed
importance: Undecided → Wishlist
Revision history for this message
Ramon Schepers (ramon-udongein-inaba) wrote :

hello, thanks for the reply, i am using mixxx 1.10 installed via the L-ubuntu (also called Udoobuntu, it's version is 12.04) software center, since i somehow can't compile mixxx 1.11 (compiler refuses to install on my udoo quad as of now) and mixxx 1.11 isn't on the software center.

and i looked in the mixxx.cfg file, but can't see the waveformtype and show_spinny declarations in the file.. (might be because my mixxx version is outdated?)

to be honest, i don't have that much experience with debugging and such, but the log-file basically says no errors.

also, disabling the waveforms and spinny's is possible, but it would make dj'ing very hard.

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

I assume Udoobuntu 12.04 is based on Ubuntu Precise.

Mixxx 1.12 alpha compiles with Precise.
You may follow:
http://mixxx.org/wiki/doku.php/compiling_on_linux
Using the current master branch.

Which step fails on Udoo? What is the error message?

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/1316402 and should we just have 1 'bug' for tracking this?

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

This bug is unassigned. So feel free to pick it up.
If you have question ask here or at the mixxx-devel mailing list.

Revision history for this message
aart (amvanbaren) wrote :

Hi guys,

I found a workaround to this issue. I successfully compiled Mixxx 1.12 for the Odroid C1.
This probably also works for other ARM SoC's.

I took the following steps:
Install all packages as described on http://mixxx.org/wiki/doku.php/compiling_on_linux.
Download the Mixxx 1.12 source code and extract the source code.
Download the attached zip archive and extract it.
Copy the attached files to [Mixxx 1.12 directory]/src/waveform/renderers
The attached files have all the OpenGL code commented out.

Open a terminal and go to the extracted Mixxx 1.12 directory, e.g. mixxx-1.12.0-beta1
To compile use: scons -j [nr of cores] optimize=native machine=armhf
Tweak the nr of cores that you use for compilation, e.g. the Odroid has a quadcore processor, but due to a lack of RAM I can only use 2 cores. If you want to play it safe, just use one core.

It might be that during compilation you get an error saying that GL_Double is defined twice in both qgl.h and glx.h. If you get this error message, comment out the GL_Double definition in qgl.h (definition line number and exact file path are mentioned in the error message)
Rebuild or continue compilation

After compilation:
To test Mixxx 1.12, type in the terminal: lin32_build/mixxx
Go to Options/Preferences/Waveforms
Choose an option for 'Summary type' that doesn't have (GL) or (GLSL) at the end of its name.
Load a track into one of the decks and check whether a waveform is shown.
Report your findings in this thread.
If Mixxx works satisfactory install Mixxx as outlined in http://mixxx.org/wiki/doku.php/compiling_on_linux.

Cheers!

Revision history for this message
aart (amvanbaren) wrote :

Forgot to mention that you shouldn't forget to uncomment the GL_Double definition once you're done installing mixxx, else you'll get mysterious errors/bugs while compiling other QT projects.

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

Good news! Thank you.
It would be great, if you can manage to spend some extra time to do a github pull request. This way we are able to maintain your code in the master banch. Es-opengl can become an optional scons feature, located in build/features.py
Do you need help? Just ask.

Revision history for this message
aart (amvanbaren) wrote :

Hi Daniel,

The changes I made to the code, was just commenting out old deprecated OpenGL code, see: http://stackoverflow.com/questions/14300569/opengl-glbegin-glend. Mixxx 1.12 compiles fine on my laptop running Fedora, so I guess OpenGL has compatibility mechanisms in place, whereas OpenGL-ES 2.0 and up don't have these compatibility mechanisms (minimize footprint and performance is higher priority).
As a long term solution it is better to rewrite the OpenGL code (in waveform/renderers) so that it is up to par with OpenGL-ES 2.0 and OpenGL 3.3 and up. There are only a couple of classes that need to be modified. I tried to make these modifications myself, but I have no experience with the new syntax and I got more errors than I initially had :P That's why I ended up just commenting the code, to see if that works.

For the short term we can create a OpenGL-ES 2 compilation option. I looked into the build/features.py, and to add a OpenGL-ES option I think (correct me if I'm wrong) I need to:
1. Add a class OpenGLES2 to features.py
2. The OpenGLES2 class should have the description(), enabled(), add_options() and sources() functions.
3. The enabled() function will programmatically check for OpenGL-ES 2.0 and up and set build.flags accordingly.
     Daniel, do you know how the OpenGL version and edition (ES or not) can be determined within the enabled() function?
4. The sources() function is where either the reqular or the OpenGL-ES2 files are appended to sources.

Will look into it this weekend.

Cheers!

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

For the first version, you may just check the the scons flag. Something like
build.flags['opengles']
I do not know how we may check this automatically. Is there a library, that is special for ES installations?
You may check for it using conf.CheckHeader() or conf.CheckLib()

Will we be finally able to write code that runs on ES and not ES Hardware?
Maybe it is worth to just do a second Pull request, with your erroneous version. Maybe one can give some hints to make it work.

Revision history for this message
aart (amvanbaren) wrote :

I've submitted a pull request for the workaround: https://github.com/mixxxdj/mixxx/pull/706

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

Is this bug talking about OpenGL ES 1.0 or 2.0? I think we probably won't implement 1.0 support, given 2.0 supersedes it. Bug #1316402 is about 2.0 support.

Revision history for this message
aart (amvanbaren) wrote :
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/7721

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.

Other bug subscribers

Remote bug watches

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