@@ -6012,57 +6012,73 @@ protected void blendModeImpl() {
6012
6012
6013
6013
} else if (blendMode == BLEND ) {
6014
6014
if (blendEqSupported ) {
6015
- pgl .blendEquation (PGL .FUNC_ADD );
6015
+ pgl .blendEquationSeparate (PGL .FUNC_ADD ,
6016
+ PGL .FUNC_ADD );
6016
6017
}
6017
- pgl .blendFunc (PGL .SRC_ALPHA , PGL .ONE_MINUS_SRC_ALPHA );
6018
+ pgl .blendFuncSeparate (PGL .SRC_ALPHA , PGL .ONE_MINUS_SRC_ALPHA ,
6019
+ PGL .ONE , PGL .ONE );
6018
6020
6019
6021
} else if (blendMode == ADD ) {
6020
6022
if (blendEqSupported ) {
6021
- pgl .blendEquation (PGL .FUNC_ADD );
6023
+ pgl .blendEquationSeparate (PGL .FUNC_ADD ,
6024
+ PGL .FUNC_ADD );
6022
6025
}
6023
- pgl .blendFunc (PGL .SRC_ALPHA , PGL .ONE );
6026
+ pgl .blendFuncSeparate (PGL .SRC_ALPHA , PGL .ONE ,
6027
+ PGL .ONE , PGL .ONE );
6024
6028
6025
6029
} else if (blendMode == SUBTRACT ) {
6026
6030
if (blendEqSupported ) {
6027
- pgl .blendEquation (PGL .FUNC_REVERSE_SUBTRACT );
6028
- pgl .blendFunc (PGL .ONE , PGL .SRC_ALPHA );
6031
+ pgl .blendEquationSeparate (PGL .FUNC_REVERSE_SUBTRACT ,
6032
+ PGL .FUNC_ADD );
6033
+ pgl .blendFuncSeparate (PGL .SRC_ALPHA , PGL .ONE ,
6034
+ PGL .ONE , PGL .ONE );
6029
6035
} else {
6030
6036
PGraphics .showWarning (BLEND_DRIVER_ERROR , "SUBTRACT" );
6031
6037
}
6032
6038
6033
6039
} else if (blendMode == LIGHTEST ) {
6034
6040
if (blendEqSupported ) {
6035
- pgl .blendEquation (PGL .FUNC_MAX );
6036
- pgl .blendFunc (PGL .SRC_ALPHA , PGL .DST_ALPHA );
6041
+ pgl .blendEquationSeparate (PGL .FUNC_MAX ,
6042
+ PGL .FUNC_ADD );
6043
+ pgl .blendFuncSeparate (PGL .ONE , PGL .ONE ,
6044
+ PGL .ONE , PGL .ONE );
6037
6045
} else {
6038
6046
PGraphics .showWarning (BLEND_DRIVER_ERROR , "LIGHTEST" );
6039
6047
}
6040
6048
6041
6049
} else if (blendMode == DARKEST ) {
6042
6050
if (blendEqSupported ) {
6043
- pgl .blendEquation (PGL .FUNC_MIN );
6044
- pgl .blendFunc (PGL .SRC_ALPHA , PGL .DST_ALPHA );
6051
+ pgl .blendEquationSeparate (PGL .FUNC_MIN ,
6052
+ PGL .FUNC_ADD );
6053
+ pgl .blendFuncSeparate (PGL .ONE , PGL .ONE ,
6054
+ PGL .ONE , PGL .ONE );
6045
6055
} else {
6046
6056
PGraphics .showWarning (BLEND_DRIVER_ERROR , "DARKEST" );
6047
6057
}
6048
6058
6049
6059
} else if (blendMode == EXCLUSION ) {
6050
6060
if (blendEqSupported ) {
6051
- pgl .blendEquation (PGL .FUNC_ADD );
6061
+ pgl .blendEquationSeparate (PGL .FUNC_ADD ,
6062
+ PGL .FUNC_ADD );
6052
6063
}
6053
- pgl .blendFunc (PGL .ONE_MINUS_DST_COLOR , PGL .ONE_MINUS_SRC_COLOR );
6064
+ pgl .blendFuncSeparate (PGL .ONE_MINUS_DST_COLOR , PGL .ONE_MINUS_SRC_COLOR ,
6065
+ PGL .ONE , PGL .ONE );
6054
6066
6055
6067
} else if (blendMode == MULTIPLY ) {
6056
6068
if (blendEqSupported ) {
6057
- pgl .blendEquation (PGL .FUNC_ADD );
6069
+ pgl .blendEquationSeparate (PGL .FUNC_ADD ,
6070
+ PGL .FUNC_ADD );
6058
6071
}
6059
- pgl .blendFunc (PGL .DST_COLOR , PGL .SRC_COLOR );
6072
+ pgl .blendFuncSeparate (PGL .ZERO , PGL .SRC_COLOR ,
6073
+ PGL .ONE , PGL .ONE );
6060
6074
6061
6075
} else if (blendMode == SCREEN ) {
6062
6076
if (blendEqSupported ) {
6063
- pgl .blendEquation (PGL .FUNC_ADD );
6077
+ pgl .blendEquationSeparate (PGL .FUNC_ADD ,
6078
+ PGL .FUNC_ADD );
6064
6079
}
6065
- pgl .blendFunc (PGL .ONE_MINUS_DST_COLOR , PGL .ONE );
6080
+ pgl .blendFuncSeparate (PGL .ONE_MINUS_DST_COLOR , PGL .ONE ,
6081
+ PGL .ONE , PGL .ONE );
6066
6082
6067
6083
} else if (blendMode == DIFFERENCE ) {
6068
6084
PGraphics .showWarning (BLEND_RENDERER_ERROR , "DIFFERENCE" );
0 commit comments