44 kOOUniformConvertClamp = 0x0001U,
45 kOOUniformConvertNormalize = 0x0002U,
46 kOOUniformConvertToMatrix = 0x0004U,
47 kOOUniformBindToSuperTarget = 0x0008U,
49 kOOUniformConvertDefaults = kOOUniformConvertToMatrix | kOOUniformBindToSuperTarget
51typedef uint16_t OOUniformConvertOptions;
57 OOShaderProgram *shaderProgram;
58 NSMutableDictionary *uniforms;
66+ (BOOL)configurationDictionarySpecifiesShaderMaterial:(NSDictionary *)configuration;
92+ (instancetype) shaderMaterialWithName:(NSString *)name
93 configuration:(NSDictionary *)configuration
94 macros:(NSDictionary *)macros
95 bindingTarget:(
id<OOWeakReferenceSupport>)target;
97- (id) initWithName:(NSString *)name
98 configuration:(NSDictionary *)configuration
99 macros:(NSDictionary *)macros
100 bindingTarget:(
id<OOWeakReferenceSupport>)target;
125- (BOOL) bindUniform:(NSString *)uniformName
126 toObject:(
id<OOWeakReferenceSupport>)target
127 property:(
SEL)selector
128 convertOptions:(OOUniformConvertOptions)options;
135- (BOOL) bindSafeUniform:(NSString *)uniformName
136 toObject:(
id<OOWeakReferenceSupport>)target
137 propertyNamed:(NSString *)property
138 convertOptions:(OOUniformConvertOptions)options;
142- (void) setUniform:(NSString *)uniformName intValue:(
int)value;
143- (void) setUniform:(NSString *)uniformName floatValue:(
float)value;
144- (void) setUniform:(NSString *)uniformName vectorValue:(GLfloat[4])value;
145- (void) setUniform:(NSString *)uniformName vectorObjectValue:(
id)value;
146- (void) setUniform:(NSString *)uniformName quaternionValue:(Quaternion)value asMatrix:(BOOL)asMatrix;
156-(void) addUniformsFromDictionary:(NSDictionary *)uniformDefs withBindingTarget:(
id<OOWeakReferenceSupport>)target;
161@interface NSObject (ShaderBindingHierarchy)
166- (id<OOWeakReferenceSupport>) superShaderBindingTarget;
178 kTangentAttributeIndex = 15
190@interface NSObject (OOShaderMaterialTargetOptional)
192- (uint32_t) randomSeedForShaders;
198extern NSString *
const kOOVertexShaderSourceKey;
199extern NSString *
const kOOVertexShaderNameKey;
200extern NSString *
const kOOFragmentShaderSourceKey;
201extern NSString *
const kOOFragmentShaderNameKey;
202extern NSString *
const kOOTexturesKey;
203extern NSString *
const kOOTextureObjectsKey;
204extern NSString *
const kOOUniformsKey;
205extern NSString *
const kOOIsSynthesizedMaterialConfigurationKey;
206extern NSString *
const kOOIsSynthesizedMaterialMacrosKey;
BOOL OOUniformBindingPermitted(NSString *propertyName, id bindingTarget)