|
|
@ -367,6 +367,8 @@ public class RenderState implements Cloneable, Savable { |
|
|
|
ADDITIONAL.applyDepthWrite = false; |
|
|
|
ADDITIONAL.applyDepthWrite = false; |
|
|
|
ADDITIONAL.applyDepthTest = false; |
|
|
|
ADDITIONAL.applyDepthTest = false; |
|
|
|
ADDITIONAL.applyColorWrite = false; |
|
|
|
ADDITIONAL.applyColorWrite = false; |
|
|
|
|
|
|
|
ADDITIONAL.applyBlendEquation = false; |
|
|
|
|
|
|
|
ADDITIONAL.applyBlendEquationAlpha = false; |
|
|
|
ADDITIONAL.applyBlendMode = false; |
|
|
|
ADDITIONAL.applyBlendMode = false; |
|
|
|
ADDITIONAL.applyPolyOffset = false; |
|
|
|
ADDITIONAL.applyPolyOffset = false; |
|
|
|
} |
|
|
|
} |
|
|
@ -380,6 +382,10 @@ public class RenderState implements Cloneable, Savable { |
|
|
|
boolean applyDepthTest = true; |
|
|
|
boolean applyDepthTest = true; |
|
|
|
boolean colorWrite = true; |
|
|
|
boolean colorWrite = true; |
|
|
|
boolean applyColorWrite = true; |
|
|
|
boolean applyColorWrite = true; |
|
|
|
|
|
|
|
BlendEquation blendEquation = BlendEquation.Add; |
|
|
|
|
|
|
|
boolean applyBlendEquation = true; |
|
|
|
|
|
|
|
BlendEquationAlpha blendEquationAlpha = BlendEquationAlpha.InheritColor; |
|
|
|
|
|
|
|
boolean applyBlendEquationAlpha = true; |
|
|
|
BlendMode blendMode = BlendMode.Off; |
|
|
|
BlendMode blendMode = BlendMode.Off; |
|
|
|
boolean applyBlendMode = true; |
|
|
|
boolean applyBlendMode = true; |
|
|
|
float offsetFactor = 0; |
|
|
|
float offsetFactor = 0; |
|
|
@ -424,6 +430,8 @@ public class RenderState implements Cloneable, Savable { |
|
|
|
oc.write(backStencilDepthPassOperation, "backStencilDepthPassOperation", StencilOperation.Keep); |
|
|
|
oc.write(backStencilDepthPassOperation, "backStencilDepthPassOperation", StencilOperation.Keep); |
|
|
|
oc.write(frontStencilFunction, "frontStencilFunction", TestFunction.Always); |
|
|
|
oc.write(frontStencilFunction, "frontStencilFunction", TestFunction.Always); |
|
|
|
oc.write(backStencilFunction, "backStencilFunction", TestFunction.Always); |
|
|
|
oc.write(backStencilFunction, "backStencilFunction", TestFunction.Always); |
|
|
|
|
|
|
|
oc.write(blendEquation, "blendEquation", BlendEquation.Add); |
|
|
|
|
|
|
|
oc.write(blendEquationAlpha, "blendEquationAlpha", BlendEquationAlpha.InheritColor); |
|
|
|
oc.write(depthFunc, "depthFunc", TestFunction.LessOrEqual); |
|
|
|
oc.write(depthFunc, "depthFunc", TestFunction.LessOrEqual); |
|
|
|
oc.write(lineWidth, "lineWidth", 1); |
|
|
|
oc.write(lineWidth, "lineWidth", 1); |
|
|
|
|
|
|
|
|
|
|
@ -433,6 +441,8 @@ public class RenderState implements Cloneable, Savable { |
|
|
|
oc.write(applyDepthWrite, "applyDepthWrite", true); |
|
|
|
oc.write(applyDepthWrite, "applyDepthWrite", true); |
|
|
|
oc.write(applyDepthTest, "applyDepthTest", true); |
|
|
|
oc.write(applyDepthTest, "applyDepthTest", true); |
|
|
|
oc.write(applyColorWrite, "applyColorWrite", true); |
|
|
|
oc.write(applyColorWrite, "applyColorWrite", true); |
|
|
|
|
|
|
|
oc.write(applyBlendEquation, "applyBlendEquation", true); |
|
|
|
|
|
|
|
oc.write(applyBlendEquationAlpha, "applyBlendEquationAlpha", true); |
|
|
|
oc.write(applyBlendMode, "applyBlendMode", true); |
|
|
|
oc.write(applyBlendMode, "applyBlendMode", true); |
|
|
|
oc.write(applyPolyOffset, "applyPolyOffset", true); |
|
|
|
oc.write(applyPolyOffset, "applyPolyOffset", true); |
|
|
|
oc.write(applyDepthFunc, "applyDepthFunc", true); |
|
|
|
oc.write(applyDepthFunc, "applyDepthFunc", true); |
|
|
@ -460,6 +470,8 @@ public class RenderState implements Cloneable, Savable { |
|
|
|
backStencilDepthPassOperation = ic.readEnum("backStencilDepthPassOperation", StencilOperation.class, StencilOperation.Keep); |
|
|
|
backStencilDepthPassOperation = ic.readEnum("backStencilDepthPassOperation", StencilOperation.class, StencilOperation.Keep); |
|
|
|
frontStencilFunction = ic.readEnum("frontStencilFunction", TestFunction.class, TestFunction.Always); |
|
|
|
frontStencilFunction = ic.readEnum("frontStencilFunction", TestFunction.class, TestFunction.Always); |
|
|
|
backStencilFunction = ic.readEnum("backStencilFunction", TestFunction.class, TestFunction.Always); |
|
|
|
backStencilFunction = ic.readEnum("backStencilFunction", TestFunction.class, TestFunction.Always); |
|
|
|
|
|
|
|
blendEquation = ic.readEnum("blendEquation", BlendEquation.class, BlendEquation.Add); |
|
|
|
|
|
|
|
blendEquationAlpha = ic.readEnum("blendEquationAlpha", BlendEquationAlpha.class, BlendEquationAlpha.InheritColor); |
|
|
|
depthFunc = ic.readEnum("depthFunc", TestFunction.class, TestFunction.LessOrEqual); |
|
|
|
depthFunc = ic.readEnum("depthFunc", TestFunction.class, TestFunction.LessOrEqual); |
|
|
|
lineWidth = ic.readFloat("lineWidth", 1); |
|
|
|
lineWidth = ic.readFloat("lineWidth", 1); |
|
|
|
|
|
|
|
|
|
|
@ -469,6 +481,8 @@ public class RenderState implements Cloneable, Savable { |
|
|
|
applyDepthWrite = ic.readBoolean("applyDepthWrite", true); |
|
|
|
applyDepthWrite = ic.readBoolean("applyDepthWrite", true); |
|
|
|
applyDepthTest = ic.readBoolean("applyDepthTest", true); |
|
|
|
applyDepthTest = ic.readBoolean("applyDepthTest", true); |
|
|
|
applyColorWrite = ic.readBoolean("applyColorWrite", true); |
|
|
|
applyColorWrite = ic.readBoolean("applyColorWrite", true); |
|
|
|
|
|
|
|
applyBlendEquation = ic.readBoolean("applyBlendEquation", true); |
|
|
|
|
|
|
|
applyBlendEquationAlpha = ic.readBoolean("applyBlendEquationAlpha", true); |
|
|
|
applyBlendMode = ic.readBoolean("applyBlendMode", true); |
|
|
|
applyBlendMode = ic.readBoolean("applyBlendMode", true); |
|
|
|
applyPolyOffset = ic.readBoolean("applyPolyOffset", true); |
|
|
|
applyPolyOffset = ic.readBoolean("applyPolyOffset", true); |
|
|
|
applyDepthFunc = ic.readBoolean("applyDepthFunc", true); |
|
|
|
applyDepthFunc = ic.readBoolean("applyDepthFunc", true); |
|
|
@ -531,6 +545,14 @@ public class RenderState implements Cloneable, Savable { |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (blendEquation != rs.blendEquation) { |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (blendEquationAlpha != rs.blendEquationAlpha) { |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (blendMode != rs.blendMode) { |
|
|
|
if (blendMode != rs.blendMode) { |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
@ -1214,6 +1236,14 @@ public class RenderState implements Cloneable, Savable { |
|
|
|
return applyBlendMode; |
|
|
|
return applyBlendMode; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public boolean isApplyBlendEquation() { |
|
|
|
|
|
|
|
return applyBlendEquation; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public boolean isApplyBlendEquationAlpha() { |
|
|
|
|
|
|
|
return applyBlendEquationAlpha; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public boolean isApplyColorWrite() { |
|
|
|
public boolean isApplyColorWrite() { |
|
|
|
return applyColorWrite; |
|
|
|
return applyColorWrite; |
|
|
|
} |
|
|
|
} |
|
|
@ -1430,7 +1460,7 @@ public class RenderState implements Cloneable, Savable { |
|
|
|
applyColorWrite = true; |
|
|
|
applyColorWrite = true; |
|
|
|
applyBlendEquation = true; |
|
|
|
applyBlendEquation = true; |
|
|
|
applyBlendEquationAlpha = true; |
|
|
|
applyBlendEquationAlpha = true; |
|
|
|
applyBlendMode = true; |
|
|
|
applyBlendMode = true; |
|
|
|
applyPolyOffset = true; |
|
|
|
applyPolyOffset = true; |
|
|
|
applyDepthFunc = true; |
|
|
|
applyDepthFunc = true; |
|
|
|
applyLineWidth = true; |
|
|
|
applyLineWidth = true; |
|
|
|