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
9941c8d6
Commit
9941c8d6
authored
Aug 20, 2015
by
Gaëtan Renaudeau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
write some more doc
parent
d8f96616
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
docs/examples/1.md
docs/examples/1.md
+6
-0
docs/examples/2.md
docs/examples/2.md
+5
-0
No files found.
docs/examples/1.md
View file @
9941c8d6
...
@@ -44,3 +44,9 @@ class HelloGL extends React.Component {
...
@@ -44,3 +44,9 @@ class HelloGL extends React.Component {
}
}
}
}
```
```
A GL component is implemented in 2 parts:
-
first, you need to implement a fragment shader in GLSL (OpenGL Shading Language).
Give it to
`GL.Shaders.create`
and you have a backed object in return (like
`StyleSheet.create`
).
-
second, you can render a
`<GL.View>`
and pass-in the shader you have defined previously.
**Do not forget to give a width and height**
.
docs/examples/2.md
View file @
9941c8d6
...
@@ -49,3 +49,8 @@ class Saturation extends React.Component {
...
@@ -49,3 +49,8 @@ class Saturation extends React.Component {
}
}
}
}
```
```
GL.View supports
`uniforms`
props that allow to send to the shader any parameters from the JavaScript world.
In this example, we send the
`factor`
number (that come from props) and we also send the image.
The image have the same format as the
`source`
passed in an
`<Image/>`
.
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