Fix for mac

This commit is contained in:
Atlante45 2016-01-20 12:28:14 -08:00
parent 72790d361b
commit a5603140de
5 changed files with 12 additions and 19 deletions

View file

@ -10,12 +10,12 @@
!>
<@if not GPU_INPUTS_SLH@>
<@def GPU_INPUTS_SLH@>
in vec4 inPosition;
in vec4 inNormal;
in vec4 inColor;
in vec4 inTexCoord0;
in vec4 inTangent;
in vec4 inSkinClusterIndex;
in vec4 inSkinClusterWeight;
in vec4 inTexCoord1;
layout(location = 0) in vec4 inPosition;
layout(location = 1) in vec4 inNormal;
layout(location = 2) in vec4 inColor;
layout(location = 3) in vec4 inTexCoord0;
layout(location = 4) in vec4 inTangent;
layout(location = 5) in vec4 inSkinClusterIndex;
layout(location = 6) in vec4 inSkinClusterWeight;
layout(location = 7) in vec4 inTexCoord1;
<@endif@>

View file

@ -34,11 +34,7 @@ const ElementArray& getDefaultElements() {
//SKIN_CLUSTER_WEIGHT = 6,
Element::VEC4F_XYZW,
//TEXCOORD1 = 7,
Element::VEC2F_UV,
//INSTANCE_SCALE = 8,
Element::VEC3F_XYZ,
//INSTANCE_TRANSLATE = 9,
Element::VEC3F_XYZ
Element::VEC2F_UV
}};
return defaultElements;
}

View file

@ -37,9 +37,7 @@ public:
SKIN_CLUSTER_INDEX = 5,
SKIN_CLUSTER_WEIGHT = 6,
TEXCOORD1 = 7,
INSTANCE_SCALE = 8,
INSTANCE_TRANSLATE = 9,
NUM_INPUT_SLOTS = INSTANCE_TRANSLATE + 1,
NUM_INPUT_SLOTS = TEXCOORD1 + 1,
DRAW_CALL_INFO = 15, // Reserve last input slot for draw call infos

View file

@ -35,7 +35,7 @@ struct TransformObject {
mat4 _modelInverse;
};
in ivec2 _drawCallInfo;
layout(location=15) in ivec2 _drawCallInfo;
<@if GLPROFILE == PC_GL @>
layout(std140) buffer transformObjectBuffer {

View file

@ -1850,8 +1850,7 @@ uint32_t toCompactColor(const glm::vec4& color) {
return compactColor;
}
static const size_t INSTANCE_TRANSFORM_BUFFER = 0;
static const size_t INSTANCE_COLOR_BUFFER = 1;
static const size_t INSTANCE_COLOR_BUFFER = 0;
template <typename F>
void renderInstances(const std::string& name, gpu::Batch& batch, const glm::vec4& color, F f) {