openFrameworks-RaspberryPi / openFrameworks

This repo has migrated into the openFramworks core! Please go to http://github.com/openFrameworks/openFrameworks for the latest!
http://github.com/openFrameworks/openFrameworks
Other
104 stars 11 forks source link

ofGLESRenderer does not work. #15

Closed bakercp closed 11 years ago

bakercp commented 11 years ago

Currently the window uses the ofGLRenderer (EGL1) by default. It works (mostly). But we need to get the ofGLESRenderer working. It should work ... but currently fails when loading its default VERTEX shader.

There are lots of examples of gles2 shaders loading successfully: https://github.com/raspberrypi/firmware/blob/master/opt/vc/src/hello_pi/hello_triangle2/triangle2.c

danzeeeman commented 11 years ago

this looks like a good read on the subject as well. http://benosteen.wordpress.com/2012/04/27/using-opengl-es-2-0-on-the-raspberry-pi-without-x-windows/

On Tue, Nov 20, 2012 at 10:23 PM, Christopher Baker < notifications@github.com> wrote:

Currently the window uses the ofGLRenderer (EGL1) by default. It works (mostly). But we need to get the ofGLESRenderer working. It should work ... but currently fails when loading its default VERTEX shader.

There are lots of examples of gles2 shaders loading successfully:

https://github.com/raspberrypi/firmware/blob/master/opt/vc/src/hello_pi/hello_triangle2/triangle2.c

— Reply to this email directly or view it on GitHubhttps://github.com/openFrameworks-RaspberryPi/openFrameworks/issues/15.

"I believe in science. Unlike mathematical theorems, scientific results can't be proved. They can only be tested again and again, until only a fool would not believe them.

I cannot prove that electrons exist, but I believe fervently in their existence. And if you don't believe in them, I have a high voltage cattle prod I'm willing to apply as an argument on their behalf. Electrons speak for themselves."

-- Seth Lloyd: Quantum Mechanical Engineer, MIT

/.

bakercp commented 11 years ago

@danthemellowman this non-xwindows approach is actually identical to how ofxAppRaspberryPi window works. Th ofGLESRenderer that I'd like to pull in is this one: https://github.com/openframeworks/openFrameworks/pull/1668

It's being developed by @arturoc and @julapy.

The develop-raspberrypi branch is tracking with that PR and we have a copy here:

https://github.com/openFrameworks-RaspberryPi/openFrameworks/blob/develop-raspberrypi/libs/openFrameworks/gl/ofGLES2Renderer.h

https://github.com/openFrameworks-RaspberryPi/openFrameworks/blob/develop-raspberrypi/libs/openFrameworks/gl/ofGLES2Renderer.cpp

To test with.

I have a test project, but I don't think it's in the repo. I'll add it on my next pull. Alternatively, you can look at the

https://github.com/openFrameworks-RaspberryPi/openFrameworks/tree/develop-raspberrypi/examples/ios/iosES2ShaderExample

as a starting point.

danzeeeman commented 11 years ago

So I made a slight change and got the ofGLES2Renderer to work on the pi. Check out the video of a point cloud spinning really fast! I'll push my changes in the morning.

https://vimeo.com/53999683

On Wed, Nov 21, 2012 at 1:04 AM, Christopher Baker <notifications@github.com

wrote:

@danthemellowman https://github.com/danthemellowman this non-xwindows approach is actually identical to how ofxAppRaspberryPi window works. Th ofGLESRenderer that I'd like to pull in is this one: openframeworks#1668https://github.com/openframeworks/openFrameworks/issues/1668

It's being developed by @arturoc https://github.com/arturoc and @julapyhttps://github.com/julapy .

The develop-raspberrypi branch is tracking with that PR and we have a copy here:

https://github.com/openFrameworks-RaspberryPi/openFrameworks/blob/develop-raspberrypi/libs/openFrameworks/gl/ofGLES2Renderer.h

https://github.com/openFrameworks-RaspberryPi/openFrameworks/blob/develop-raspberrypi/libs/openFrameworks/gl/ofGLES2Renderer.cpp

To test with.

I have a test project, but I don't think it's in the repo. I'll add it on my next pull. Alternatively, you can look at the

https://github.com/openFrameworks-RaspberryPi/openFrameworks/tree/develop-raspberrypi/examples/ios/iosES2ShaderExample

as a starting point.

— Reply to this email directly or view it on GitHubhttps://github.com/openFrameworks-RaspberryPi/openFrameworks/issues/15#issuecomment-10586572.

"I believe in science. Unlike mathematical theorems, scientific results can't be proved. They can only be tested again and again, until only a fool would not believe them.

I cannot prove that electrons exist, but I believe fervently in their existence. And if you don't believe in them, I have a high voltage cattle prod I'm willing to apply as an argument on their behalf. Electrons speak for themselves."

-- Seth Lloyd: Quantum Mechanical Engineer, MIT

/.

bakercp commented 11 years ago

! You made my evening! This is really really cool. Please push ASAP :)

danzeeeman commented 11 years ago

I will as soon as I'm finished with my changes. Stuff is still seg-faulting when I run the shaders example.

On Wed, Nov 21, 2012 at 2:25 AM, Christopher Baker <notifications@github.com

wrote:

! You made my evening! This is really really cool. Please push ASAP :)

— Reply to this email directly or view it on GitHubhttps://github.com/openFrameworks-RaspberryPi/openFrameworks/issues/15#issuecomment-10587814.

"I believe in science. Unlike mathematical theorems, scientific results can't be proved. They can only be tested again and again, until only a fool would not believe them.

I cannot prove that electrons exist, but I believe fervently in their existence. And if you don't believe in them, I have a high voltage cattle prod I'm willing to apply as an argument on their behalf. Electrons speak for themselves."

-- Seth Lloyd: Quantum Mechanical Engineer, MIT

/.

arturoc commented 11 years ago

that's great! would be useful if you can push the changes to julapy's branch, custom shaders aren't working in iphone either but i haven't found the problem yet so it might be related

bakercp commented 11 years ago

+1 on that -- push everything through julapy's branch and we'll pull it back in from there.


http://christopherbaker.net

On Wed, Nov 21, 2012 at 1:57 AM, arturo notifications@github.com wrote:

that's great! would be useful if you can push the changes to julapy's branch, custom shaders aren't working in iphone either but i haven't found the problem yet so it might be related

— Reply to this email directly or view it on GitHubhttps://github.com/openFrameworks-RaspberryPi/openFrameworks/issues/15#issuecomment-10588397.

bakercp commented 11 years ago
bakercp commented 11 years ago

I'm still not able to get GLES2Renderer working -- @danthemellowman did you push your changes? And did you use the GLES2 renderer for the face mesh test video you posted?

danzeeeman commented 11 years ago

I can double check but I believe I was using it.

On Tue, Nov 27, 2012 at 4:05 AM, Christopher Baker <notifications@github.com

wrote:

I'm still not able to get GLES2Renderer working -- @danthemellowmanhttps://github.com/danthemellowmandid you push your changes? And did you use the GLES2 renderer for the face mesh test video you posted?

— Reply to this email directly or view it on GitHubhttps://github.com/openFrameworks-RaspberryPi/openFrameworks/issues/15#issuecomment-10750541.

"I believe in science. Unlike mathematical theorems, scientific results can't be proved. They can only be tested again and again, until only a fool would not believe them.

I cannot prove that electrons exist, but I believe fervently in their existence. And if you don't believe in them, I have a high voltage cattle prod I'm willing to apply as an argument on their behalf. Electrons speak for themselves."

-- Seth Lloyd: Quantum Mechanical Engineer, MIT

/.

arturoc commented 11 years ago

actually you need to set EGL to start a gles2 context i have it working, will send a PR

bakercp commented 11 years ago

Closed with 3361207017fbc22a6cb1f4b5e494bcb360f067fb and 7eb9d69999dc29bbfacba7b3055ef08d60a6031d Thanks @arturoc and @julapy!