OpenGL on JUCE for Dummies

I have modified Jules' OpenGLAppExample to make it easier to apprehend for OpenGL and/or JUCE newcomers. I added *A LOT* of comments and explanations, and also some graphics components using standard 2-D core graphics engine to show how you can simultaneously use the 2 methods.TBH I wish I had had something like that when I started to look into this topic. It would have saved me a lot of time, as Jules' code is extremely well structured, but often lacks good documentation (comments, etc.). So I thought I would share my findings...

I have made a pull request on github, but it may take awhile before Jules has time to look at it and decide (or not) to integrate it.

So in the meantime you can download a zipped version of the project <a href="https://www.dropbox.com/s/kzf0itv4zvia35o/NewOpenGLAppExample.zip?dl=0">here</a>.

I welcome comments/suggestions, of course. 

Alan.

P.S. Can someone tell me what is wrong in my html link display above? It should display "here" instead of the whole link metatag, shouldn't it ? Probably missed something, as usual...

2 Likes

Thanks for this, downloaded.

At some point I'm going to dig into JUCE GL, I've been putting it off as I wrote a GL engine on iOS once and I remember it being painful.

I remember a couple of months ago someone posting a very similar thread, was it you?

I've tried searching the forum for it but I can't find it.  Can anyone connect the threads?

It kind of shows up the lack of forum searching capability.  If only we had a tag based system with the 20 most common tags clickable when you create the post (so people don't use different words for the same thing, and don't omit core tags), then I could search for OpenGL && tutorial tags, ordered by most recent.

It may make sense for JUCE to reference posts such as these.  I haven't seen a single URL in JUCE, but every IDE I've used in recent years handles links, and they can massively improve self documentation.

It may be an awkward decision for team JUCE to incorporate work such as this, on the one hand it contains information valuable to a beginner, and making the framework more beginner friendly makes it more accessible and hence more marketable, and is consequently of value. Contrasted against the danger of bloat, more to maintain, consistency (should JUCE end up containing tutorials on every aspect of the operating system? If not, why this?).

I would imagine a weblink to the relevant forum post would solve the issue nicely. It's only takes up a line or less of comment. And the forum link is not going to go dead as is owned by JUCE.

It would be good to see web links to the relevant tutorials (and even videos now such as Fabian's excellent talk) in other classes, for example the audio classes.

That way the code could continue to be the central organisation core for such extended documentation.

A bot could check for dead links periodically if that is a concern.

π

Ah yes, you're right: http://www.juce.com/forum/topic/opengl-juce-made-simple-well-sort

I have updated the code and added more comments since then. And also made it downloadable since Jules has not integrated it (yet?) in the demos.

Seems to work on Win/Mac/iOS/Android. Not tested on Linux

 

@Alan

Thank you Alan ! your effort makes things a bit more accesible here !

 

@pi 

the forums search is too strict by the way.

and always was, but noone complains about it. I find it hard sometimes, and its getting worse when you realise thats the only way to gain some knowledge, but cant find it ... 

Thank you, Alan. I have just started struggling on how to use OpenGL for 2D graphics with Juce (I’m working on an emulator project), and all these comments are being very helpful to get started.