* LwjglGL1Renderer: do not set vertexbuffer on mesh if vertexcolor is disabled. This fixes issue where an unshaded material still uses vertex colors even if they are disabled.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9613 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
Sha..rd 13 years ago
parent 20566963f8
commit 8e153c0379
  1. 5
      engine/src/lwjgl/com/jme3/renderer/lwjgl/LwjglGL1Renderer.java

@ -907,6 +907,11 @@ public class LwjglGL1Renderer implements GL1Renderer {
} }
public void setVertexAttrib(VertexBuffer vb, VertexBuffer idb) { public void setVertexAttrib(VertexBuffer vb, VertexBuffer idb) {
if (vb.getBufferType() == VertexBuffer.Type.Color && !context.useVertexColor) {
// Ignore vertex color buffer if vertex color is disabled.
return;
}
int arrayType = convertArrayType(vb.getBufferType()); int arrayType = convertArrayType(vb.getBufferType());
if (arrayType == -1) { if (arrayType == -1) {
return; // unsupported return; // unsupported

Loading…
Cancel
Save