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
8b8e11b8
Commit
8b8e11b8
authored
Sep 24, 2015
by
Gaëtan Renaudeau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
better solution for alpha. might still have some issue
parent
8267b0c0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
22 deletions
+46
-22
Examples/Tests/index.ios.js
Examples/Tests/index.ios.js
+38
-11
RNGL/GLCanvas.m
RNGL/GLCanvas.m
+8
-11
No files found.
Examples/Tests/index.ios.js
View file @
8b8e11b8
...
...
@@ -92,32 +92,59 @@ class Tests extends React.Component {
<
/NativeLayer
>
<
NativeLayer
width
=
{
debugSize
}
height
=
{
debugSize
}
>
<
Copy
width
=
{
debugSize
}
height
=
{
debugSize
}
>
http
:
//i.imgur.com/S22HNaU.png
<
Image
source
=
{{
uri
:
"
http://i.imgur.com/S22HNaU.png
"
}}
width
=
{
debugSize
}
height
=
{
debugSize
}
/
>
<
Copy
width
=
{
debugSize
}
height
=
{
debugSize
}
opaque
=
{
false
}
>
http
:
//i.imgur.com/mp79p5T.png
<
/Copy
>
<
Image
source
=
{{
uri
:
"
http://i.imgur.com/mp79p5T.png
"
}}
width
=
{
debugSize
}
height
=
{
debugSize
}
/
>
<
/NativeLayer
>
<
NativeLayer
width
=
{
debugSize
}
height
=
{
debugSize
}
>
<
Image
source
=
{{
uri
:
"
http://i.imgur.com/S22HNaU.png
"
}}
width
=
{
debugSize
}
height
=
{
debugSize
}
/
>
<
Copy
width
=
{
debugSize
}
height
=
{
debugSize
}
opaque
=
{
false
}
>
<
Copy
>
http
:
//i.imgur.com/mp79p5T.png
<
/Copy
>
<
/Copy
>
<
/NativeLayer
>
<
NativeLayer
width
=
{
debugSize
}
height
=
{
debugSize
}
>
<
Copy
width
=
{
debugSize
}
height
=
{
debugSize
}
>
http
:
//i.imgur.com/S22HNaU.png
<
Image
source
=
{{
uri
:
"
http://i.imgur.com/S22HNaU.png
"
}}
width
=
{
debugSize
}
height
=
{
debugSize
}
/
>
<
Copy
width
=
{
debugSize
}
height
=
{
debugSize
}
opaque
=
{
false
}
>
<
Copy
>
<
Copy
>
http
:
//i.imgur.com/mp79p5T.png
<
/Copy
>
<
/Copy
>
<
/Copy
>
<
/NativeLayer
>
<
NativeLayer
width
=
{
debugSize
}
height
=
{
debugSize
}
>
<
Image
source
=
{{
uri
:
"
http://i.imgur.com/S22HNaU.png
"
}}
width
=
{
debugSize
}
height
=
{
debugSize
}
/
>
<
Copy
width
=
{
debugSize
}
height
=
{
debugSize
}
opaque
=
{
false
}
>
<
Copy
>
<
Copy
>
<
Copy
>
http
:
//i.imgur.com/mp79p5T.png
<
/Copy
>
<
/Copy
>
<
/Copy
>
<
/Copy
>
<
/NativeLayer
>
<
Layer
width
=
{
debugSize
}
height
=
{
debugSize
}
>
{
"
http://i.imgur.com/S22HNaU.png
"
}
{
"
http://i.imgur.com/mp79p5T.png
"
}
<
/Layer
>
<
NativeLayer
width
=
{
debugSize
}
height
=
{
debugSize
}
>
<
Image
source
=
{{
uri
:
"
http://i.imgur.com/S22HNaU.png
"
}}
width
=
{
debugSize
}
height
=
{
debugSize
}
/
>
<
Copy
width
=
{
debugSize
}
height
=
{
debugSize
}
opaque
=
{
false
}
>
<
Copy
>
<
Copy
>
<
Copy
>
<
Copy
>
http
:
//i.imgur.com/mp79p5T.png
<
/Copy
>
<
/Copy
>
<
/Copy
>
<
/Copy
>
<
/Copy
>
<
/NativeLayer
>
<
/View
>
<
/ScrollView>
;
...
...
RNGL/GLCanvas.m
View file @
8b8e11b8
...
...
@@ -336,9 +336,6 @@ RCT_NOT_IMPLEMENTED(-init)
[
fbo
bind
];
}
glClear
(
GL_COLOR_BUFFER_BIT
);
glClearColor
(
0
.
0
,
0
.
0
,
0
.
0
,
0
.
0
);
[
renderData
.
shader
bind
];
for
(
NSString
*
uniformName
in
renderData
.
textures
)
{
...
...
@@ -351,22 +348,22 @@ RCT_NOT_IMPLEMENTED(-init)
[
renderData
.
shader
setUniform
:
uniformName
withValue
:
renderData
.
uniforms
[
uniformName
]];
}
glBlendFuncSeparate
(
GL_SRC_ALPHA
,
GL_ONE_MINUS_SRC_ALPHA
,
GL_ONE
,
GL_ONE_MINUS_SRC_ALPHA
);
glClearColor
(
0
.
0
,
0
.
0
,
0
.
0
,
0
.
0
);
glClear
(
GL_COLOR_BUFFER_BIT
);
glBlendFunc
(
GL_ONE
,
GL_ONE_MINUS_SRC_ALPHA
);
glDrawArrays
(
GL_TRIANGLES
,
0
,
6
);
};
// DRAWING THE SCENE
glGetIntegerv
(
GL_FRAMEBUFFER_BINDING
,
&
defaultFBO
);
glDisable
(
GL_BLEND
);
[
self
syncContentTextures
];
recDraw
(
_renderData
);
glGetIntegerv
(
GL_FRAMEBUFFER_BINDING
,
&
defaultFBO
);
glEnable
(
GL_BLEND
);
glBlendFunc
(
GL_SRC_ALPHA
,
GL_ONE_MINUS_SRC_ALPHA
);
recDraw
(
_renderData
);
glDisable
(
GL_BLEND
);
glBindFramebuffer
(
GL_FRAMEBUFFER
,
defaultFBO
);
}
}
...
...
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