Commit 06ac7c0f authored by Gaëtan Renaudeau's avatar Gaëtan Renaudeau

Fixes #30

parent b5cf9192
......@@ -29,6 +29,23 @@ RCT_EXPORT_VIEW_PROPERTY(onLoad, BOOL);
RCT_EXPORT_VIEW_PROPERTY(onProgress, BOOL);
RCT_EXPORT_VIEW_PROPERTY(onChange, BOOL);
/* TODO
RCT_EXPORT_METHOD(capture:
(nonnull NSNumber *)reactTag
callback:(RCTResponseSenderBlock)callback)
{
UIView *view = [self.bridge.uiManager viewForReactTag:reactTag];
if ([view isKindOfClass:[GLCanvas class]]) {
[((GLCanvas*)view) capture: callback];
}
else {
callback(@[@"view is not a GLCanvas"]);
}
}
*/
- (UIView *)view
{
GLCanvas * v;
......
......@@ -32,8 +32,8 @@
- (void)restore
{
glBindFramebuffer(GL_FRAMEBUFFER, _fbo);
glBindRenderbuffer(GL_FRAMEBUFFER, _rbo);
glBindTexture(GL_FRAMEBUFFER, _tex);
glBindRenderbuffer(GL_RENDERBUFFER, _rbo);
glBindTexture(GL_TEXTURE_2D, _tex);
}
@end
......@@ -128,8 +128,8 @@ GLuint initRenderBuffer (float width, float height, GLuint component, GLuint att
if (width == _width && height == _height) return;
GLint maxFBOSize;
glGetIntegerv(GL_MAX_RENDERBUFFER_SIZE, &maxFBOSize);
if( _width < 0 || _width > maxFBOSize ||
_height < 0 || _height > maxFBOSize) {
if( width < 0 || width > maxFBOSize ||
height < 0 || height > maxFBOSize) {
RCTLogError(@"Can't resize framebuffer. Invalid dimensions");
return;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment