Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to build shader tutorial #4194

Open
avilleret opened this issue Aug 5, 2015 · 11 comments
Open

how to build shader tutorial #4194

avilleret opened this issue Aug 5, 2015 · 11 comments

Comments

@avilleret
Copy link
Contributor

Shader tutorials don't have project files (just as examples) in git repository.
Generating project file for examples is explain in the Readme.md but I can't find how to generate shader tutorials project.

@bilderbuchi
Copy link
Member

ping @arturoc @julapy @ofZach ?

@avilleret
Copy link
Contributor Author

for now the only way I found to generate project for tutorials/shader/* is to use the projectGeneratorLegacy and choose the update option.

but I can't build them, here is the error I got for the first two :

/home/antoine/lib-src/openFrameworks/tutorials/shader/02_simpleVertexDisplacement/src/main.cpp: In function ‘int main()’:
/home/antoine/lib-src/openFrameworks/tutorials/shader/02_simpleVertexDisplacement/src/main.cpp:16:56: error: could not convert ‘ofGLProgrammableRenderer::TYPE’ from ‘const string {aka const std::basic_string<char>}’ to ‘std::shared_ptr<ofBaseRenderer>’
     ofSetCurrentRenderer(ofGLProgrammableRenderer::TYPE);

so my question is still unsolved :-/

@ofZach
Copy link
Contributor

ofZach commented Aug 6, 2015

is there someone who has responsibility for these tutorials? It seems like moving them to their own repo and out of the main repo would be good as they are maybe orphaned here? Their role in the repo has never been clear to me, but I do think having a way of promoting "example packs" would be interesting to consider post 0.9.

@ofZach
Copy link
Contributor

ofZach commented Aug 6, 2015

@avilleret the syntax for programmable renderer has changed, it now looks like:

ofGLWindowSettings settings;
settings.setGLVersion(3,2);
ofCreateWindow(settings);
ofRunApp(new ofApp);

@kylemcdonald
Copy link
Contributor

@ofZach i think it's @julapy and @joshuajnoble who wrote the shader tutorials.

they go with http://openframeworks.cc/tutorials/graphics/shaders.html and the text is hosted in https://github.com/openframeworks/ofSite/tree/master/_tutorials

one alternative would be to create a new repo that has both the text and the example code, and use scripts to package up the tutorials with the releases & publish them to the ofSite. they do have a lot of crossover in both places.

@arturoc
Copy link
Member

arturoc commented Aug 6, 2015

just fixed the examples so they work with 0.9.

you can always generate the project files for any project by running the project generator simple over it

the original idea of the tutorials folder was that over time people would contribute more tutorials and that having them with the OF download would make it easier to learn OF and somehow compensate for the lack of documentation in some areas.

i still think it's a good idea but if we only have one tutorial it kind of misses the point.

@joshuajnoble
Copy link
Contributor

Agree with @arturoc if there's only one it doesn't feel quite right. Potentially though if there's several dozen tutorials that would really swell the size of the download, which is already quite large.

@avilleret
Copy link
Contributor Author

I agree with most of the comments, but it doesn't really answer the question : how to build tutorials.
Thanks to @arturoc for the up-to-date code.
But I think a tutorial targets beginner, then its build workflow should be easy to understand and to do.
At least it should be documented somewhere.
For now the only way I found is to use the legacy project generator.
And I have to run it for each tutorial one by one, which is quite boring.
I think it should be good to have a tool like the generate example in the legacy project generator for the tutorials.
Maybe this tool exists, but again, it should be documented more obviously, because if it exists I missed it for some days... :-)

So in my point of view the project generation should be done by the buildAllExamples.sh script.
For now this script just run make in each example folder, I think it should also generate project if they don't exists, to avoid error (btw this will make #4183 obsolete).
And the same applies to the tutorials.
We need a script to generate tutorials project and then build them.

If people should understand the whole project building process before trying thing it's unproductive I think.
At least, in my point of view, if I can quickly see what I can do with a tool then I'll want to learn more about that tool, but if I have to learn how the tool works before seeing what I so with it then I may give it up quickly. :-)

@arturoc
Copy link
Member

arturoc commented Aug 6, 2015

as i said before you can also use the projectgenerator simple to update projects just run it pointing the path to an exisiting project or folder with source code.

the fact that this is not easy to do is that theoretically this would be included in the downloadable packages and there wouldn't be no need to run any scripts since the scripts for every platform would be already there. since we never did more tutorials meant to be included with the OF download it's never been included in the packages.

not sure what to do we can probably move it to a different repo? another option would be to include this tutorial as a chapter of the OF book if the original authors are ok with that, we could include source from other chapters in the tutorials folder, probably renamed to book, and include the book with the OF download?

@julapy
Copy link
Member

julapy commented Aug 6, 2015

yeah the idea at YCAM was to start making more tutorials and making them easy to find by OF users, so we put them into a tutorial folder because it was more structured then the examples folder and came with documentation for all the tutorials.

maybe we can add them to examples?

On 7 Aug 2015, at 4:17 am, arturo notifications@github.com wrote:

as i said before you can also use the projectgenerator simple to update projects just run it pointing the path to an exisiting project or folder with source code.

the fact that this is not easy to do is that theoretically this would be included in the downloadable packages and there wouldn't be no need to run any scripts since the scripts for every platform would be already there. since we never did more tutorials meant to be included with the OF download it's never been included in the packages.

not sure what to do we can probably move it to a different repo? another option would be to include this tutorial as a chapter of the OF book if the original authors are ok with that, we could include source from other chapters in the tutorials folder, probably renamed to book, and include the book with the OF download?


Reply to this email directly or view it on GitHub.

@bilderbuchi
Copy link
Member

maybe we can add them to examples?

2df1422: moved shader examples into tutorial section.

The circle is complete! ^.^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants