Fix loophole with model colour attribute in CCRenderState

This commit is contained in:
Chicken-Bomes committed 2014-06-15 00:43:20 +10:00
1 parent 0529baaf23
commit 29ef6904f0
2 files changed
+3 -4

No files matched your search

@@ -84,10 +84,8 @@ public class CCRenderPipeline
if(CCRenderState.useNormals)
addAttribute(CCRenderState.normalAttrib);
if(CCRenderState.baseColour != -1 || CCRenderState.alphaOverride >= 0)
if(CCRenderState.hasColour)
addAttribute(CCRenderState.colourAttrib);
else if(CCRenderState.hasColour)
CCRenderState.setColour(-1);
for(int i = 0; i < ops.size(); i++) {
IVertexOperation op = ops.get(i);
@@ -269,7 +269,8 @@ public class CCRenderState
public static void reset() {
model = null;
pipeline.reset();
hasNormal = hasColour = hasBrightness = false;
hasNormal = hasBrightness = false;
hasColour = true;
baseColour = alphaOverride = -1;
}