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
8267b0c0
Commit
8267b0c0
authored
Sep 24, 2015
by
Gaëtan Renaudeau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #12 alpha issue: only enable blend for fbo->screen drawing
parent
424c7cf2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
RNGL/GLCanvas.m
RNGL/GLCanvas.m
+9
-3
RNGL/GLShader.m
RNGL/GLShader.m
+0
-3
No files found.
RNGL/GLCanvas.m
View file @
8267b0c0
...
...
@@ -286,6 +286,8 @@ RCT_NOT_IMPLEMENTED(-init)
-
(
void
)
drawRect
:(
CGRect
)
rect
{
self
.
layer
.
opaque
=
_opaque
;
[
self
syncEventsThrough
];
if
(
!
_preloadingDone
)
{
glClearColor
(
0
.
0
,
0
.
0
,
0
.
0
,
0
.
0
);
...
...
@@ -309,9 +311,6 @@ RCT_NOT_IMPLEMENTED(-init)
{
if
(
!
_renderData
)
return
;
self
.
layer
.
opaque
=
_opaque
;
[
self
syncEventsThrough
];
CGFloat
scale
=
RCTScreenScale
();
@autoreleasepool
{
...
...
@@ -355,12 +354,19 @@ RCT_NOT_IMPLEMENTED(-init)
glDrawArrays
(
GL_TRIANGLES
,
0
,
6
);
};
// DRAWING THE SCENE
glGetIntegerv
(
GL_FRAMEBUFFER_BINDING
,
&
defaultFBO
);
glDisable
(
GL_BLEND
);
[
self
syncContentTextures
];
recDraw
(
_renderData
);
glEnable
(
GL_BLEND
);
glBlendFunc
(
GL_SRC_ALPHA
,
GL_ONE_MINUS_SRC_ALPHA
);
glBindFramebuffer
(
GL_FRAMEBUFFER
,
defaultFBO
);
}
}
...
...
RNGL/GLShader.m
View file @
8267b0c0
...
...
@@ -346,9 +346,6 @@ GLuint compileShader (NSString* shaderName, NSString* shaderString, GLenum shade
{
if
(
!
[
self
ensureContext
])
return
;
glEnable
(
GL_BLEND
);
glBlendFunc
(
GL_SRC_ALPHA
,
GL_ONE_MINUS_SRC_ALPHA
);
GLuint
vertex
=
compileShader
(
_name
,
_vert
,
GL_VERTEX_SHADER
);
if
(
vertex
==
-
1
)
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