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

CCShader needs to separate vsh/fsh name #1384

Open
elbaro opened this issue Jul 16, 2016 · 1 comment
Open

CCShader needs to separate vsh/fsh name #1384

elbaro opened this issue Jul 16, 2016 · 1 comment

Comments

@elbaro
Copy link

elbaro commented Jul 16, 2016

I am migrating my code to v3. CCGLProgram is renamed to CCShader, but I can't see the counterpart to this:

[[CCGLProgram alloc] initWithVertexShaderFilename:@"default.vsh" fragmentShaderFilename:@"vBlur.fsh"];

There is only one constructor [CCShader shaderNamed: ""] but it cannot specify the different names for vertex shader / fragment shader. There is [CCShader alloc] initWithVertex..Shader.. but it only accepts shader codes, which are not cached.

@s1ddok
Copy link
Contributor

s1ddok commented Jul 16, 2016

I kind of agree that this can be helpful, so yeah.

In the mean time, the workaround can be easily done by writing simple extension where you provide both filenames, read that files into strings and call "shader with source" initializer. Creating your own shader cache should be dead easy

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

No branches or pull requests

2 participants