OpenGLAppExample needs fixing/removal


#1

Hiho,

I get some segfaults upon shutting down my OpenGL test application and in order to check wether the error is on my fault I noticed the OpenGLAppExample is outdated. It seems to be still using the old OpenGL Component/render API. Also, it does not even build if I generate the Linux Makefiles via Introjucer. Juce library headers aren't referenced/wrapped properly, it says e.g.

#elif defined (JUCER_LINUX_MAKE_6D53C8B4)
 #include "../../../../../juce/juce_audio_basics/juce_audio_basics.h"
#else

which should read

 #include "../../../../../modules/juce_audio_basics/juce_audio_basics.h"

Same for all the other library components. I wonder how the paths can end up wrong since the headers are regenerated by the Introjucer...

Anyways there is the "OpenGL Application" project preset by now (and testing that shows the error is on my part, as expected). So I think the OpenGLAppExample should be removed from the project.

Now let's see what I'm doing wong...


#2

Hmmm this works for me on the latest tip. Remember that when you create a new exporter in the introjucer, the module path may not match the module path for the other exporters (and therefore may be wrong). For example, when I add the linux makefile exporter the module path is set to ../../juce by default and I need to change it.


#3

Ok, got it, merci! I suppose this should then be fixed (in the Introjucer?) s.t. the default path on linux also corresponds to the current folder structure. Also, the relative paths of includes seems not to be consistent. Upon building I now get

../../JuceLibraryCode/JuceHeader.h: No such file or directory

Since it is actually

../JuceLibraryCode/JuceHeader.h (Source and JuceLibraryCode are on the same level).

Maybe you want to look into that.

 

Regarding my initial point, I still think the example should be removed since it is using the old render() API if I'm not mistaken.


#4

I just see (since it builds and runs fine now) that it does more than just the OpenGL Application template. Well in that case it should be switched to demonstrate the new API.