diff --git a/RNGL/GLCanvas.m b/RNGL/GLCanvas.m index 874ea411482faa8a2ae56c57e66c1444a70a47b4..e5e19deb87a8dd86643d7bf70969035a5965c9f1 100644 --- a/RNGL/GLCanvas.m +++ b/RNGL/GLCanvas.m @@ -160,7 +160,6 @@ RCT_NOT_IMPLEMENTED(-init) weak_traverseTree = traverseTree = ^GLRenderData *(GLData *data) { NSNumber *width = data.width; NSNumber *height = data.height; - BOOL premultipliedAlpha = data.premultipliedAlpha; int fboId = [data.fboId intValue]; NSMutableArray *contextChildren = [[NSMutableArray alloc] init]; @@ -255,8 +254,7 @@ RCT_NOT_IMPLEMENTED(-init) withHeight:height withFboId:fboId withContextChildren:contextChildren - withChildren:children - withPremultipliedAlpha:premultipliedAlpha]; + withChildren:children]; }; _renderData = traverseTree(_data); @@ -350,14 +348,9 @@ 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); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glClearColor(0.0, 0.0, 0.0, 0.0); glClear(GL_COLOR_BUFFER_BIT); - - if (renderData.premultipliedAlpha) - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - else - glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); glDrawArrays(GL_TRIANGLES, 0, 6); }; diff --git a/RNGL/GLData.h b/RNGL/GLData.h index 376528e47ed77081f2374c197ce17ac67c91e79a..610261f101d699a562ee315a5f0e20cf19050280 100644 --- a/RNGL/GLData.h +++ b/RNGL/GLData.h @@ -11,7 +11,6 @@ @property (nonatomic) NSNumber *fboId; @property (nonatomic) NSArray *contextChildren; @property (nonatomic) NSArray *children; -@property (nonatomic) BOOL premultipliedAlpha; -(instancetype)initWithShader: (NSNumber *)shader withUniforms: (NSDictionary *)uniforms @@ -19,7 +18,6 @@ withHeight: (NSNumber *)height withFboId: (NSNumber *)fboId withContextChildren: (NSArray *)contextChildren - withChildren: (NSArray *)children - withPremultipliedAlpha: (BOOL)premultipliedAlpha; + withChildren: (NSArray *)children; @end diff --git a/RNGL/GLData.m b/RNGL/GLData.m index c1db168a6a992d4879f82cbf81d4921c887443ca..246685431b6c4b4b8181950600ab8f28282ac212 100644 --- a/RNGL/GLData.m +++ b/RNGL/GLData.m @@ -9,7 +9,6 @@ withFboId: (NSNumber *)fboId withContextChildren: (NSArray *)contextChildren withChildren: (NSArray *)children - withPremultipliedAlpha: (BOOL)premultipliedAlpha { if ((self = [super init])) { self.shader = shader; @@ -19,7 +18,6 @@ self.fboId = fboId; self.contextChildren = contextChildren; self.children = children; - self.premultipliedAlpha = premultipliedAlpha; } return self; } diff --git a/RNGL/GLRenderData.h b/RNGL/GLRenderData.h index 80cab9c02af05186505b4d73d70306319f3147a5..44ecf9d2fe03aa86509f21c650e658791bcde221 100644 --- a/RNGL/GLRenderData.h +++ b/RNGL/GLRenderData.h @@ -12,7 +12,6 @@ @property (nonatomic) int fboId; @property (nonatomic) NSArray *contextChildren; @property (nonatomic) NSArray *children; -@property (nonatomic) BOOL premultipliedAlpha; -(instancetype) initWithShader: (GLShader *)shader withUniforms:(NSDictionary *)uniforms @@ -21,7 +20,6 @@ withHeight: (NSNumber *)height withFboId: (int)fboId withContextChildren: (NSArray *)contextChildren - withChildren: (NSArray *)children - withPremultipliedAlpha: (BOOL)premultipliedAlpha; + withChildren: (NSArray *)children; @end diff --git a/RNGL/GLRenderData.m b/RNGL/GLRenderData.m index 2d6698468721805b29e085a276c61daf8bbab6cb..f4b6721c6ec01c8eeecf037813ed5a5f8e02633f 100644 --- a/RNGL/GLRenderData.m +++ b/RNGL/GLRenderData.m @@ -11,7 +11,6 @@ withFboId: (int)fboId withContextChildren: (NSArray *)contextChildren withChildren: (NSArray *)children - withPremultipliedAlpha: (BOOL)premultipliedAlpha { if ((self = [super init])) { @@ -23,7 +22,6 @@ self.fboId = fboId; self.contextChildren = contextChildren; self.children = children; - self.premultipliedAlpha = premultipliedAlpha; } return self; } diff --git a/RNGL/RCTConvert+GLData.m b/RNGL/RCTConvert+GLData.m index 82996555bf8e76bff2ad500753817d089ba6377d..e65f49cd84f828339c39663fbdfffb8900124148 100644 --- a/RNGL/RCTConvert+GLData.m +++ b/RNGL/RCTConvert+GLData.m @@ -25,8 +25,6 @@ GLData *child = [self GLData:childJSON]; [contextChildren addObject:child]; } - - BOOL premultipliedAlpha = [self BOOL:json[@"premultipliedAlpha"]]; return [[GLData alloc] initWithShader: shader withUniforms: uniforms @@ -34,8 +32,7 @@ withHeight: height withFboId: fboId withContextChildren: contextChildren - withChildren: children - withPremultipliedAlpha: premultipliedAlpha]; + withChildren: children]; } @end