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

Allow user to specify contents of main.cpp manually. #139

Open
mileshiroo opened this issue Oct 20, 2014 · 3 comments
Open

Allow user to specify contents of main.cpp manually. #139

mileshiroo opened this issue Oct 20, 2014 · 3 comments
Milestone

Comments

@mileshiroo
Copy link

Hello,

I'm trying to use run shaders with the ofShader object, which requires this call before ofSetupOpenGL(1024, 768, OF_WINDOW) in main():

ofSetCurrentRenderer(ofGLProgrammableRenderer::TYPE);

Is there any way to do this in ofSketch, that is, is there a way to modify what goes in main()? Running the line in setup() creates a second window. Thank you!

@bakercp
Copy link
Member

bakercp commented Oct 20, 2014

Excellent question. We're currently working on handlers so that you can just use the standard main.cpp / ofApp.h/cpp, etc. That will make it easier. In the mean time, you could modify Resources/Templates/CompilerTemplates/main.tmpl ... not ideal though.

@bakercp bakercp changed the title How to use shaders with ofSketch? Allow user to specify contents of main.cpp manually. Oct 20, 2014
@bakercp bakercp added this to the v0.5.0 milestone Oct 20, 2014
@brannondorsey
Copy link
Member

Yes, this is not ideal at the moment. Additionally, you may need to make sure that ofSketch is closed when making an edit to main.cpp so that the changes you make are correctly loaded into the app.

@mileshiroo
Copy link
Author

Great, thanks for the response @bakercp and @brannondorsey!

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

3 participants