-
Notifications
You must be signed in to change notification settings - Fork 2
/
v002Shader.h
executable file
·41 lines (33 loc) · 1.69 KB
/
v002Shader.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//-------------------------------------------------------------------------
//
// Required Includes
//
//-------------------------------------------------------------------------
#import <Foundation/Foundation.h>
#import <OpenGL/OpenGL.h>
#import "v002UniqueClassNames.h"
//-------------------------------------------------------------------------
//
// GLSL Shader
//
//-------------------------------------------------------------------------
@interface V002_UNIQUE_CLASS_NAME(v002Shader) : NSObject
{
@private
GLhandleARB programObject; // the program object
CGLContextObj cgl_ctx; // context to bind shaders to.
} // Shader
- (id)initWithShadersInAppBundle:(NSString *)theShadersName forContext:(CGLContextObj)context;
- (id)initWithShadersInAppBundle:(NSString *)theShadersName forContext:(CGLContextObj)context error:(NSError **)error;
- (id)initWithShadersInBundle:(NSBundle *)bundle withName:(NSString *)theShadersName forContext:(CGLContextObj)context;
- (id)initWithShadersInBundle:(NSBundle *)bundle withName:(NSString *)theShadersName forContext:(CGLContextObj)context error:(NSError **)error;
- (id)initWithShadersInDirectory:(NSString *)directory withName:(NSString *)theShadersName forContext:(CGLContextObj)context error:(NSError **)error;
// Designated initializer:
- (id)initWithVertexShader:(NSString *)vert fragmentShader:(NSString *)frag forContext:(CGLContextObj)context error:(NSError **)error;
- (GLhandleARB) programObject;
- (GLint) getUniformLocation:(const GLcharARB *)theUniformName;
@end
//-------------------------------------------------------------------------
#if defined(V002_USE_CLASS_ALIAS)
@compatibility_alias v002Shader V002_UNIQUE_CLASS_NAME(v002Shader);
#endif