Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gl-react-native-v2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Jira
Jira
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ym
gl-react-native-v2
Commits
06ac7c0f
Commit
06ac7c0f
authored
Nov 27, 2015
by
Gaëtan Renaudeau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #30
parent
b5cf9192
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
4 deletions
+21
-4
ios/GLCanvasManager.m
ios/GLCanvasManager.m
+17
-0
ios/GLFBO.m
ios/GLFBO.m
+4
-4
No files found.
ios/GLCanvasManager.m
View file @
06ac7c0f
...
@@ -29,6 +29,23 @@ RCT_EXPORT_VIEW_PROPERTY(onLoad, BOOL);
...
@@ -29,6 +29,23 @@ RCT_EXPORT_VIEW_PROPERTY(onLoad, BOOL);
RCT_EXPORT_VIEW_PROPERTY
(
onProgress
,
BOOL
);
RCT_EXPORT_VIEW_PROPERTY
(
onProgress
,
BOOL
);
RCT_EXPORT_VIEW_PROPERTY
(
onChange
,
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
-
(
UIView
*
)
view
{
{
GLCanvas
*
v
;
GLCanvas
*
v
;
...
...
ios/GLFBO.m
View file @
06ac7c0f
...
@@ -32,8 +32,8 @@
...
@@ -32,8 +32,8 @@
-
(
void
)
restore
-
(
void
)
restore
{
{
glBindFramebuffer
(
GL_FRAMEBUFFER
,
_fbo
);
glBindFramebuffer
(
GL_FRAMEBUFFER
,
_fbo
);
glBindRenderbuffer
(
GL_
FRAME
BUFFER
,
_rbo
);
glBindRenderbuffer
(
GL_
RENDER
BUFFER
,
_rbo
);
glBindTexture
(
GL_
FRAMEBUFFER
,
_tex
);
glBindTexture
(
GL_
TEXTURE_2D
,
_tex
);
}
}
@end
@end
...
@@ -128,8 +128,8 @@ GLuint initRenderBuffer (float width, float height, GLuint component, GLuint att
...
@@ -128,8 +128,8 @@ GLuint initRenderBuffer (float width, float height, GLuint component, GLuint att
if
(
width
==
_width
&&
height
==
_height
)
return
;
if
(
width
==
_width
&&
height
==
_height
)
return
;
GLint
maxFBOSize
;
GLint
maxFBOSize
;
glGetIntegerv
(
GL_MAX_RENDERBUFFER_SIZE
,
&
maxFBOSize
);
glGetIntegerv
(
GL_MAX_RENDERBUFFER_SIZE
,
&
maxFBOSize
);
if
(
_width
<
0
||
_
width
>
maxFBOSize
||
if
(
width
<
0
||
width
>
maxFBOSize
||
_height
<
0
||
_
height
>
maxFBOSize
)
{
height
<
0
||
height
>
maxFBOSize
)
{
RCTLogError
(
@"Can't resize framebuffer. Invalid dimensions"
);
RCTLogError
(
@"Can't resize framebuffer. Invalid dimensions"
);
return
;
return
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment