Commit 8b8e11b8 authored by Gaëtan Renaudeau's avatar Gaëtan Renaudeau

better solution for alpha. might still have some issue

parent 8267b0c0
......@@ -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}>
http://i.imgur.com/mp79p5T.png
<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}>
http://i.imgur.com/mp79p5T.png
<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>;
......
......@@ -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);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment