# EYESY openFrameworks (beta) mode development

**URL:** <https://forum.critterandguitari.com/t/eyesy-openframeworks-beta-mode-development/6703>\
**Category:** EYESY\
**Created:** [December 16, 2020, 9:45pm UTC](https://forum.critterandguitari.com/t/eyesy-openframeworks-beta-mode-development/6703 "2020-12-16T21:45:22Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![okyeron](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.critterandguitari.com/okyeron/32/3931_2.png) [@okyeron](https://forum.critterandguitari.com/u/okyeron)\
**Post date:** [December 16, 2020, 9:45pm UTC](https://forum.critterandguitari.com/t/eyesy-openframeworks-beta-mode-development/6703/1 "2020-12-16T21:45:23Z")

</div>

Here’s a thread for dev conversation on making Modes for the openFrameworks / openGL / Lua version of EYESY.

Perhaps this can be a good place to share tips / tricks / techniques / questions for making ofLua Modes along with sharing scripts themselves (until patchstorage gets an EYESY category - [see here](https://patchstorage.com/requests/) to vote for adding the EYESY category there).

Here’s an example I made yesterday which uses Stereo inputs - audio changing circle size, z position, and color, knobs changing rotation.

(had to remove audio on this since it was something off my iPod and not cleared for YT)

[![](https://img.youtube.com/vi/1ItRoKafIuU/maxresdefault.jpg "EYESY ofLua modes experiment 2") ](https://www.youtube.com/watch?v=1ItRoKafIuU)

---

<div class="post-metadata">

**Author:** ![AlphaPotato](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.critterandguitari.com/alphapotato/32/4436_2.png) [@AlphaPotato](https://forum.critterandguitari.com/u/AlphaPotato)\
**Post date:** [December 23, 2020, 6:54pm UTC](https://forum.critterandguitari.com/t/eyesy-openframeworks-beta-mode-development/6703/2 "2020-12-23T18:54:06Z")

</div>

Very cool! I’m pretty clueless about Open Frameworks and Lua so I’m just starting by tweaking other patches. Care to post yours?

---

<div class="post-metadata">

**Author:** ![okyeron](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.critterandguitari.com/okyeron/32/3931_2.png) [@okyeron](https://forum.critterandguitari.com/u/okyeron)\
**Post date:** [December 23, 2020, 7:24pm UTC](https://forum.critterandguitari.com/t/eyesy-openframeworks-beta-mode-development/6703/3 "2020-12-23T19:24:40Z")

</div>

I started by modifying the ofLua examples.

I’ll try to post some examples soon

EDIT: here’s a couple Modes if someone wants to test them (second one is whats in the video above)

[RectGridSOUND.zip](https://forum.critterandguitari.com/uploads/short-url/5BUmQgd7rXguOg1MNkN5bcJEIFd.zip) (2.2 KB)

[2circles.zip](https://forum.critterandguitari.com/uploads/short-url/zl1oM7jhzw27s0AYqngcRoEfSjW.zip) (1.8 KB)

---

<div class="post-metadata">

**Author:** ![Dcomplex](https://avatars.discourse-cdn.com/v4/letter/d/f14d63/32.png) [@Dcomplex](https://forum.critterandguitari.com/u/Dcomplex)\
**Post date:** [December 24, 2020, 4:01am UTC](https://forum.critterandguitari.com/t/eyesy-openframeworks-beta-mode-development/6703/4 "2020-12-24T04:01:06Z")

</div>

Awesome I’m looking for new modes… Thanks,

[![](https://img.youtube.com/vi/vGv8g6L7V8g/maxresdefault.jpg "FUSION UNIVERSE Live Stream") ](https://www.youtube.com/watch?v=vGv8g6L7V8g)

---

<div class="post-metadata">

**Author:** ![okyeron](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.critterandguitari.com/okyeron/32/3931_2.png) [@okyeron](https://forum.critterandguitari.com/u/okyeron)\
**Post date:** [March 1, 2021, 4:56am UTC](https://forum.critterandguitari.com/t/eyesy-openframeworks-beta-mode-development/6703/5 "2021-03-01T04:56:16Z")

</div>

I’ve started to get some ofLua examples posted on [Patchstorage](https://patchstorage.com/platform/eyesy/?search_query=&tax_platform=eyesy&tax_post_tag%5B%5D=oflua&orderby=modified).

---

<div class="post-metadata">

**Author:** ![PlumWrinkles](https://avatars.discourse-cdn.com/v4/letter/p/96bed5/32.png) [@PlumWrinkles](https://forum.critterandguitari.com/u/PlumWrinkles)\
**Post date:** [March 1, 2021, 9:01pm UTC](https://forum.critterandguitari.com/t/eyesy-openframeworks-beta-mode-development/6703/6 "2021-03-01T21:01:51Z")

</div>

I’m assuming these patches you’ve listed on patchstorage require another step beyond simply uploading and unzipping the files on a stock Eyesy…

do I need to change something to run these Lua files?

I uploaded and unzipped, saved, and rebooted.

there are no new patches on the Eyesy.

---

<div class="post-metadata">

**Author:** ![okyeron](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.critterandguitari.com/okyeron/32/3931_2.png) [@okyeron](https://forum.critterandguitari.com/u/okyeron)\
**Post date:** [March 1, 2021, 9:05pm UTC](https://forum.critterandguitari.com/t/eyesy-openframeworks-beta-mode-development/6703/7 "2021-03-01T21:05:50Z")

</div>

They are for the oFLua/openframeworks version of EYESY - so you need to have that beta stuff installed. [See here](https://forum.critterandguitari.com/t/eyesy-disk-image-for-openframeworks-opengl-lua-beta/6499)

Then these modes would be dropped in /sdcard/Modes/oFLua. Then you would need to `Stop Video` from the web editor, and `Start oFLua`

---

<div class="post-metadata">

**Author:** ![PlumWrinkles](https://avatars.discourse-cdn.com/v4/letter/p/96bed5/32.png) [@PlumWrinkles](https://forum.critterandguitari.com/u/PlumWrinkles)\
**Post date:** [March 1, 2021, 9:07pm UTC](https://forum.critterandguitari.com/t/eyesy-openframeworks-beta-mode-development/6703/8 "2021-03-01T21:07:23Z")

</div>

thanks for the quick reply!

is it possible to have both “regular” Eyesy and oFLua versions on the device and simply switch in the OSD menu?

---

<div class="post-metadata">

**Author:** ![okyeron](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.critterandguitari.com/okyeron/32/3931_2.png) [@okyeron](https://forum.critterandguitari.com/u/okyeron)\
**Post date:** [March 1, 2021, 9:09pm UTC](https://forum.critterandguitari.com/t/eyesy-openframeworks-beta-mode-development/6703/9 "2021-03-01T21:09:22Z")

</div>

They are 2 different “engines” so you can’t run them at the same time. But they can co-exist and you can easily switch between them from the web editor (without a device reboot).

I don’t believe there is a way to switch between engines from the device controls - only from the web editor (or via SSH).

---

<div class="post-metadata">

**Author:** ![PlumWrinkles](https://avatars.discourse-cdn.com/v4/letter/p/96bed5/32.png) [@PlumWrinkles](https://forum.critterandguitari.com/u/PlumWrinkles)\
**Post date:** [March 1, 2021, 9:17pm UTC](https://forum.critterandguitari.com/t/eyesy-openframeworks-beta-mode-development/6703/10 "2021-03-01T21:17:28Z")

</div>

that’d be cool if that was possible while on a gig (without a computer)!

thanks for the tips!

---

<div class="post-metadata">

**Author:** ![okyeron](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.critterandguitari.com/okyeron/32/3931_2.png) [@okyeron](https://forum.critterandguitari.com/u/okyeron)\
**Post date:** [March 1, 2021, 9:18pm UTC](https://forum.critterandguitari.com/t/eyesy-openframeworks-beta-mode-development/6703/11 "2021-03-01T21:18:09Z")

</div>

You could run the web editor on your phone or a tablet. 🙂

---

<div class="post-metadata">

**Author:** ![PlumWrinkles](https://avatars.discourse-cdn.com/v4/letter/p/96bed5/32.png) [@PlumWrinkles](https://forum.critterandguitari.com/u/PlumWrinkles)\
**Post date:** [March 1, 2021, 9:19pm UTC](https://forum.critterandguitari.com/t/eyesy-openframeworks-beta-mode-development/6703/12 "2021-03-01T21:19:49Z")

</div>

Oooo, I forgot about that in this moment

---

<div class="post-metadata">

**Author:** ![PlumWrinkles](https://avatars.discourse-cdn.com/v4/letter/p/96bed5/32.png) [@PlumWrinkles](https://forum.critterandguitari.com/u/PlumWrinkles)\
**Post date:** [March 1, 2021, 9:26pm UTC](https://forum.critterandguitari.com/t/eyesy-openframeworks-beta-mode-development/6703/13 "2021-03-01T21:26:29Z")

</div>

It’d be super handy if we could create a backup of the SD card from the editor.

…unless we already can and I’m just daft…

I just read that installing oF/Lua will wipe the card.

---

<div class="post-metadata">

**Author:** ![insektgod](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.critterandguitari.com/insektgod/32/4688_2.png) [@insektgod](https://forum.critterandguitari.com/u/insektgod)\
**Post date:** [March 3, 2021, 5:17pm UTC](https://forum.critterandguitari.com/t/eyesy-openframeworks-beta-mode-development/6703/14 "2021-03-03T17:17:53Z")

</div>

Are there any Web resources that one might refer to in order to begin learning LUA/OFx/OpenGL in general or specifically as they relate to developing Modes for the EYESY?

---

<div class="post-metadata">

**Author:** ![chrisk](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.critterandguitari.com/chrisk/32/11_2.png) [@chrisk](https://forum.critterandguitari.com/u/chrisk)\
**Post date:** [March 3, 2021, 5:39pm UTC](https://forum.critterandguitari.com/t/eyesy-openframeworks-beta-mode-development/6703/15 "2021-03-03T17:39:50Z")

</div>

> [@insektgod](#):
>
> Are there any Web resources that one might refer to in order to begin learning LUA/OFx/OpenGL in general or specifically as they relate to developing Modes for the EYESY?

There is some info here about this: [EYESY disk image for openFrameworks / openGL / Lua (beta)](https://forum.critterandguitari.com/t/eyesy-disk-image-for-openframeworks-opengl-lua-beta/6499) Specifically:

> [@EYESY disk image for openFrameworks / openGL / Lua (beta)](https://forum.critterandguitari.com/t/eyesy-disk-image-for-openframeworks-opengl-lua-beta/6499/1):
>
> The Lua interface allows access to the core [openFrameworks API](https://openframeworks.cc/documentation/), so most of the openFrameworks documentation and examples apply here. However there is difference between the openFrameworks syntax (which is C++) and Lua, so openFrameworks code can’t merely be copied and pasted. These differences are outlined in the [Lua openFrameworks plugin readme](https://github.com/danomatika/ofxLua/blob/master/README.md).

Additionally we posted [EYESY Example Modes for openFrameworks / openGL / Lua](https://forum.critterandguitari.com/t/eyesy-example-modes-for-openframeworks-opengl-lua/6582) which should take some of the guesswork out of getting the bigger concepts/syntax from openFrameworks into Lua.

---

<div class="post-metadata">

**Author:** ![okyeron](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.critterandguitari.com/okyeron/32/3931_2.png) [@okyeron](https://forum.critterandguitari.com/u/okyeron)\
**Post date:** [March 3, 2021, 6:01pm UTC](https://forum.critterandguitari.com/t/eyesy-openframeworks-beta-mode-development/6703/16 "2021-03-03T18:01:28Z")

</div>

> [@insektgod](#):
>
> Are there any Web resources that one might refer to in order to begin learning LUA/OFx/OpenGL in general or specifically as they relate to developing Modes for the EYESY?

I thought this thread might serve as a good place to collect references.

Ask questions here for sure - I’ve been poking at the OF stuff for a couple months on and off.

Unfortunately the ofLua versions of the OF functions are sometimes a little confusing if you’re looking at OF source code and trying to adapt it.

# Resources

[This is a list of all the oFLua function syntax](https://github.com/danomatika/loaf/blob/master/doc/modules/of_syntax.txt) which can be helpful if you’re not sure about how a particular function is done in oFLua.

[OF documentation](https://openframeworks.cc/documentation/)

Then there’s also the [openFrameworks discussion forum](https://forum.openframeworks.cc), but that might be a much wider/deeper rabbit hole than you need.

### OpenGL/WebGL resources:

[shadertoy](https://www.shadertoy.com)

[OpenProcessing](https://www.openprocessing.org)

---

<div class="post-metadata">

**Author:** ![okyeron](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.critterandguitari.com/okyeron/32/3931_2.png) [@okyeron](https://forum.critterandguitari.com/u/okyeron)\
**Post date:** [March 4, 2021, 7:21pm UTC](https://forum.critterandguitari.com/t/eyesy-openframeworks-beta-mode-development/6703/17 "2021-03-04T19:21:42Z")

</div>

Still don’t know how to make this sort of thing go on EYESY yet, but gonna try…

Another WebGL resource:

> **[twigl.app](https://twigl.app/)**
>
> twigl.app is an online editor for One tweet shader, with gif generator and sound shader.

---

<div class="post-metadata">

**Author:** ![rina\_t](https://avatars.discourse-cdn.com/v4/letter/r/d9b06d/32.png) [@rina\_t](https://forum.critterandguitari.com/u/rina_t)\
**Post date:** [March 8, 2021, 8:31pm UTC](https://forum.critterandguitari.com/t/eyesy-openframeworks-beta-mode-development/6703/18 "2021-03-08T20:31:04Z")

</div>

Curious to see how this goes! I’ve got some old shader code I want to turn into an eyesy mode, but I’m new to OFx/Lua so still struggling to figure out how to do that

---

<div class="post-metadata">

**Author:** ![rina\_t](https://avatars.discourse-cdn.com/v4/letter/r/d9b06d/32.png) [@rina\_t](https://forum.critterandguitari.com/u/rina_t)\
**Post date:** [March 12, 2021, 3:24pm UTC](https://forum.critterandguitari.com/t/eyesy-openframeworks-beta-mode-development/6703/19 "2021-03-12T15:24:20Z")

</div>

So I tried to adapt some shader code into a new mode yesterday and ran into the following issue  
`
[error] ofShader: sorry, it looks like you can’t run ‘ARB_shader_objects’
[error] ofShader: please check the capabilites of your graphics card:
[error] ofShader: setupShaderFromSource(): failed creating GL_VERTEX_SHADER shader
[error] ofShader: sorry, it looks like you can’t run ‘ARB_shader_objects’
[error] ofShader: please check the capabilites of your graphics card:
[error] ofShader: setupShaderFromSource(): failed creating GL_FRAGMENT_SHADER shader
[error] ofShader: linkProgram(): trying to link GLSL program, but no shaders created yet
`

It seems as though you need to set the GL ES version to get shaders working on the Pi. I linked a similar github issue below that seems to solve this issue. The problem I’m running into however, is that the `ofGLWindowSettings` class being accessed in the c++ code in the github issue doesn’t seem to be implemented in the Lua build of OF. I’ll keep looking into this one but if anyone has any suggestions to address this that would be super helpful!

> <https://github.com/openframeworks/openFrameworks/issues/5056>
>
> I'm using OpenFrameworks v0.9.3 on a Raspberry Pi 3, and the shader examples don't work out of the box, failing with...

---

<div class="post-metadata">

**Author:** ![okyeron](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.critterandguitari.com/okyeron/32/3931_2.png) [@okyeron](https://forum.critterandguitari.com/u/okyeron)\
**Post date:** [March 12, 2021, 6:57pm UTC](https://forum.critterandguitari.com/t/eyesy-openframeworks-beta-mode-development/6703/20 "2021-03-12T18:57:46Z")

</div>

I ran into similar problems and didn’t get far in solving them.

The github issue above is in regards to OF 0.9.3 and things have changed a bit in OF 0.11.0 (which is what’s on EYESY). (I believe) `ofGLWindowSettings settings;` does not seem to be used now. Many of the OF shader examples didn’t work for me on the Pi. I worked on this like a month ago and don’t remember all the various details now.

See my reference here: [Running Shader On Rpi 4 - arm - openFrameworks](https://forum.openframeworks.cc/t/running-shader-on-rpi-4/35641)

So - unfortunately it seems like an open issue. I’ve not had time to go back and poke at this further.

[Next page](https://forum.critterandguitari.com/t/eyesy-openframeworks-beta-mode-development/6703.md?page=2)
