Open themancalledjakob opened 10 months ago
Hi @themancalledjakob ! thanks for that suggestion. you are right. Do you mind making a PR?
hey @patriciogonzalezvivo,
yep, here it is: #9
actually, it could make sense to turn this into an openFrameworks addon.
Then, the addon could automatically copy the shader library in a project when the addon is included. addon could look like this:
ofxLygia
├── addon_config.mk
├── data
│ └── @lygia
├── example
│ ├── addons.make
│ ├── bin
│ │ └── data
│ │ ├── *.frag
│ │ └── imgs
│ │ └── *.png
│ └── src
│ ├── main.cpp
│ ├── ofApp.cpp
│ └── ofApp.h
└── README.md
I didn't yet check out the code properly, but it is also possible to copy different flavors depending on the build (e.g. OpenGL ES for emscripten builds).
There is an addon_config.mk
, which could hold something like this:
meta:
ADDON_NAME = ofxLygia
ADDON_DESCRIPTION = LYGIA, it's a granular and multi-language (GLSL, HLSL, WGSL, MSL and CUDA) shader library designed for performance and flexibility
ADDON_AUTHOR = Patricio Gonzalez Vivo
ADDON_TAGS = "webgl library shaders computer-graphics glsl shader hlsl glsl-shader wgpu hlsl-shader metal-shader wgsl shader-library wgsl-shader"
ADDON_URL = https://github.com/patriciogonzalezvivo/ofxLygia
common:
# [edit: removed comments]
# some addons need resources to be copied to the bin/data folder of the project
# specify here any files that need to be copied, you can use wildcards like * and ?
# ADDON_DATA =
ADDON_DATA = data/lygia
emscripten:
# this is obviously not a real directory, just to show how it could be possible
ADDON_DATA = data/lygia/egl
linux64:
ADDON_DATA = data/lygia/gl3
hey patricio,
I think you want to remove & ignore
config.make
as it sets yourOF_ROOT
to/home/patricio/Desktop/openFrameworks
.https://github.com/patriciogonzalezvivo/lygia_of_examples/blob/main/config.make#L11
This directory obviously exists for you, so everything works when you run it. But everyone else will see an error:
I saw that you mention in the README to use the projectGenerator, which I guess also fixes this, but if you just leave that file away it works without the need to generate a new project :)
so then you simply do: