GLTexture.h 558 Bytes
Newer Older
Gaëtan Renaudeau's avatar
Gaëtan Renaudeau committed
1 2
#import <GLKit/GLKit.h>
#import "RCTBridge.h"
3 4 5
#import "GLImageData.h"

GLImageData* genPixelsWithImage (UIImage *image);
Gaëtan Renaudeau's avatar
Gaëtan Renaudeau committed
6 7 8 9

@interface GLTexture: NSObject

@property EAGLContext *context;
10
@property GLuint handle;
Gaëtan Renaudeau's avatar
Gaëtan Renaudeau committed
11 12 13

- (instancetype)init;
- (int)bind: (int)unit;
14 15 16
- (void)bind;

- (void)setShapeWithWidth:(float)width withHeight:(float)height;
Gaëtan Renaudeau's avatar
Gaëtan Renaudeau committed
17

18
- (void)setPixels: (GLImageData *)data;
Gaëtan Renaudeau's avatar
Gaëtan Renaudeau committed
19 20 21 22 23 24
- (void)setPixelsEmpty;
- (void)setPixelsRandom: (int)width withHeight:(int)height;
- (void)setPixelsWithImage: (UIImage *)image;
- (void)setPixelsWithView: (UIView *)view;

@end