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
d2fc5e51
Commit
d2fc5e51
authored
Jul 02, 2016
by
Gaëtan Renaudeau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove dead code in iOS implementation
Fixes
https://github.com/ProjectSeptemberInc/gl-react-native/issues/71
parent
71a86720
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
47 deletions
+0
-47
ios/GLFBO.m
ios/GLFBO.m
+0
-11
ios/RNGLContext.m
ios/RNGLContext.m
+0
-36
No files found.
ios/GLFBO.m
View file @
d2fc5e51
...
@@ -47,17 +47,6 @@ GLTexture *initTexture (float width, float height, GLuint attachment)
...
@@ -47,17 +47,6 @@ GLTexture *initTexture (float width, float height, GLuint attachment)
return
texture
;
return
texture
;
}
}
GLuint
initRenderBuffer
(
float
width
,
float
height
,
GLuint
component
,
GLuint
attachment
)
{
GLuint
handle
;
glGenRenderbuffers
(
1
,
&
handle
);
glBindRenderbuffer
(
GL_RENDERBUFFER
,
handle
);
glRenderbufferStorage
(
GL_RENDERBUFFER
,
component
,
width
,
height
);
glFramebufferRenderbuffer
(
GL_FRAMEBUFFER
,
attachment
,
GL_RENDERBUFFER
,
handle
);
return
handle
;
}
@implementation
GLFBO
@implementation
GLFBO
{
{
GLuint
_handle
;
GLuint
_handle
;
...
...
ios/RNGLContext.m
View file @
d2fc5e51
...
@@ -45,42 +45,6 @@ RCT_EXPORT_MODULE()
...
@@ -45,42 +45,6 @@ RCT_EXPORT_MODULE()
return
_context
;
return
_context
;
}
}
-
(
void
)
_addShader
:(
nonnull
NSNumber
*
)
id
withConfig
:(
NSDictionary
*
)
config
withOnCompile
:(
RCTResponseSenderBlock
)
onCompile
{
NSString
*
vert
=
[
RCTConvert
NSString
:
config
[
@"vert"
]];
NSString
*
frag
=
[
RCTConvert
NSString
:
config
[
@"frag"
]];
NSString
*
name
=
[
RCTConvert
NSString
:
config
[
@"name"
]];
if
(
!
vert
)
{
vert
=
fullViewportVert
;
}
if
(
!
frag
)
{
RCTLogError
(
@"Shader '%@': missing frag field"
,
name
);
return
;
}
GLShader
*
shader
=
[[
GLShader
alloc
]
initWithContext
:
_context
withName
:
name
withVert
:
vert
withFrag
:
frag
];
NSError
*
error
;
bool
success
=
[
shader
ensureCompiles
:
&
error
];
if
(
onCompile
)
{
if
(
!
success
)
{
onCompile
(@[
error
.
domain
]);
}
else
{
onCompile
(@[[
NSNull
null
],
@{
@"uniforms"
:
shader
.
uniformTypes
}]);
}
}
else
{
if
(
!
success
)
{
RCTLogError
(
@"Shader '%@': %@"
,
name
,
error
.
domain
);
}
}
_shaders
[
id
]
=
shader
;
}
static
NSString
*
fullViewportVert
=
@"attribute vec2 position;varying vec2 uv;void main() {gl_Position = vec4(position,0.0,1.0);uv = vec2(0.5, 0.5) * (position+vec2(1.0, 1.0));}"
;
static
NSString
*
fullViewportVert
=
@"attribute vec2 position;varying vec2 uv;void main() {gl_Position = vec4(position,0.0,1.0);uv = vec2(0.5, 0.5) * (position+vec2(1.0, 1.0));}"
;
NSString
*
glTypeString
(
int
type
)
{
NSString
*
glTypeString
(
int
type
)
{
...
...
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