-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathGLPTexture.h
51 lines (34 loc) · 1.85 KB
/
GLPTexture.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
42
43
44
45
46
47
48
49
50
51
#import <Foundation/Foundation.h>
#import "GLPTextureBase.h"
@protocol GLPTexture <NSObject>
@required
@property (nonatomic, assign, readonly) GLenum GLTarget;
@property (nonatomic, assign, readonly) GLuint GLTexture;
- (void)bind;
- (void)bindToUnit:(GLenum)unit;
- (void)unbind;
@end
@interface GLPTexture : NSObject <GLPTexture>
{
@protected
GLenum target;
GLuint texture;
}
+ (instancetype)texture;
+ (instancetype)textureWithTarget:(GLenum)target;
+ (instancetype)textureWithFormat:(GLPPixelformat)format width:(GLsizei)width height:(GLsizei)height;
+ (instancetype)textureWithFormat:(GLPPixelformat)format width:(GLsizei)width height:(GLsizei)height pixels:(const void *)pixels;
- (instancetype)initWithTarget:(GLenum)target;
- (instancetype)initWithTarget:(GLenum)target texture:(GLuint)texture freeWhenDone:(BOOL)freeWhenDone; // designated constructor
- (instancetype)initWithFormat:(GLPPixelformat)format width:(GLsizei)width height:(GLsizei)height;
- (instancetype)initWithFormat:(GLPPixelformat)format width:(GLsizei)width height:(GLsizei)height pixels:(const void *)pixels;
- (void)setFormat:(GLPPixelformat)format width:(GLsizei)width height:(GLsizei)height;
- (void)setFormat:(GLPPixelformat)format width:(GLsizei)width height:(GLsizei)height pixels:(const void *)pixels;
- (void)setFormat:(GLPPixelformat)format width:(GLsizei)width height:(GLsizei)height pixels:(const void *)pixels level:(GLint)level;
- (void)setFormat:(GLPPixelformat)format width:(GLsizei)width height:(GLsizei)height pixels:(const void *)pixels target:(GLenum)target;
- (void)setFormat:(GLPPixelformat)format width:(GLsizei)width height:(GLsizei)height pixels:(const void *)pixels target:(GLenum)target level:(GLint)level;
- (void)setWrap:(GLenum)wrap;
- (void)setFilter:(GLenum)filter;
- (void)setMinFilter:(GLenum)minFilter magFilter:(GLenum)magFilter;
- (void)generateMipmap;
@end