openframeworks / openFrameworks

openFrameworks is a community-developed cross platform toolkit for creative coding in C++.
http://openframeworks.cc
Other
9.95k stars 2.55k forks source link

Linux and OpenGL ES 2.0 #3559

Open payload opened 9 years ago

payload commented 9 years ago

I tried to get Linux 64bit and OpenGL ES 2.0 working and did it in a hackish manner, because I just needed it fast. The steps to get it done:

In ofAppRunner.cpp:

In ofConstants.h:

In config.linux.common.mk:

One has to make the makefiles and the ifdefs cleaner in differenciating between TARGET_LINUX, TARGET_ARM, TARGET_OPENGLES and such. There are many implicit assumptions tangled up in them.

arturoc commented 9 years ago

thanks! out of curiosity, in which platform are you using linux64 + opengles?

payload commented 9 years ago

Good question. I want to test a special OpenGL implementation I wrote based on ClusterGL. It only supports OpenGL ES 2.0 because it is the easiest to implement fully. But it is also notable that recent Mesa implements OpenGL ES and EGL for desktop. I use Ubuntu 14.04 with Mesa 10.1.3 on Intel Ivybridge Mobile i965.

Being able to write new applications against modern OpenGL without having a OpenGL version like 4.1 were everything got deprecated is really important I think, to use a somewhat decent OpenGL API. To much glBegin glEnd code out there.

arturoc commented 9 years ago

That looks great. Are you using ofAppEGLWindow or ofAppGLFWWindow? you shouldn't need both and from your description it seems you are compiling glfw with EGL support but then using ofAppEGLWindow?

payload commented 9 years ago

ah yes. yes one does only need ofAppEGLWindow cause ofAppRunner can go for it with the implicit assumption that TARGET_OPENGLES availability also means EGL availability. so no specially crafted libglfw3 is needed.

arturoc commented 9 years ago

i would try using glfw with EGL support instead it should be more stable than the EGL window which is a custom implementation we did specially for the raspberry pi. anyway, thanks for reporting the changes i'll check how can we remove all the assumptions that desktop linux is always not ES

payload commented 9 years ago

Is this issue still on your radar?

arturoc commented 9 years ago

it is but there's a ton of things to do before the release. next time i modify the makefiles i'll try to take a look at this. also if you want to send a PR that would be great