Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions BCMeshTransformView/BCMeshShader.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ - (BOOL)loadProgram

_program = glCreateProgram();

vertShaderPathname = [[NSBundle mainBundle] pathForResource:[self shaderName] ofType:@"vsh"];
NSBundle *bundle = [NSBundle bundleForClass:[self class]];
vertShaderPathname = [bundle pathForResource:[self shaderName] ofType:@"vsh"];
if (![self compileShader:&vertShader type:GL_VERTEX_SHADER file:vertShaderPathname]) {
NSLog(@"Failed to compile vertex shader \"%@\"", [self shaderName]);
return NO;
}

fragShaderPathname = [[NSBundle mainBundle] pathForResource:[self shaderName] ofType:@"fsh"];
fragShaderPathname = [bundle pathForResource:[self shaderName] ofType:@"fsh"];
if (![self compileShader:&fragShader type:GL_FRAGMENT_SHADER file:fragShaderPathname]) {
NSLog(@"Failed to compile fragment shader \"%@\"", [self shaderName]);
return NO;
Expand Down