Merge remote-tracking branch 'origin/master'

This commit is contained in:
NathanSweet 2014-08-31 15:58:55 +02:00
commit 6ed74bb6df
4 changed files with 9 additions and 0 deletions

View File

@ -94,6 +94,7 @@ void PolygonBatch::flush () {
if (!verticesCount) return;
GL::bindTexture2D(texture->getName());
GL::bindVAO(0);
glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION);
glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_COLOR);
glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_TEX_COORDS);

View File

@ -94,6 +94,7 @@ void PolygonBatch::flush () {
if (!verticesCount) return;
GL::bindTexture2D(texture->getName());
GL::bindVAO(0);
glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION);
glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_COLOR);
glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_TEX_COORDS);

View File

@ -94,6 +94,7 @@ void PolygonBatch::flush () {
if (!_verticesCount) return;
GL::bindTexture2D(_texture->getName());
GL::bindVAO(0);
glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION);
glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_COLOR);
glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_TEX_COORDS);

View File

@ -245,6 +245,12 @@ public class SkeletonJson {
mesh.setRegionUVs(map.require("uvs").asFloatArray());
mesh.updateUVs();
//Check if color exists
JsonValue meshColor = map.get("color");
if(meshColor != null) {
mesh.getColor().set(Color.valueOf(meshColor.asString()));
}
if (map.has("hull")) mesh.setHullLength(map.require("hull").asInt() * 2);
if (map.has("edges")) mesh.setEdges(map.require("edges").asIntArray());
mesh.setWidth(map.getFloat("width", 0) * scale);