Question

I am writing my own Quartz Composer plugin and I would like to load GLSL shaders, textures, etc. from my QC plugin's bundle. The problem is that it appears that I am getting my loading application's (the QC runtime app) bundle instead. I tried iterating through all of my bundles but this didn't seem to work either.

Is there any easy way to access my QC bundle directly?

Était-ce utile?

La solution

[NSBundle mainBundle] gives you the application bundle, not the plugin bundle.

From within a plugin's class, you could do this to get the plugin's bundle:

NSBundle *thisBundle = [NSBundle bundleForClass:[self class]];
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top