Merge pull request #10305 from H4kor/gles3

Fixes a bug in multimesh_instance_get_color
This commit is contained in:
Juan Linietsky 2017-08-31 08:44:22 -03:00 committed by GitHub
commit 51066fcde7

View file

@ -3963,7 +3963,7 @@ Color RasterizerStorageGLES3::multimesh_instance_get_color(RID p_multimesh, int
ERR_FAIL_COND_V(multimesh->color_format == VS::MULTIMESH_COLOR_NONE, Color());
int stride = multimesh->color_floats + multimesh->xform_floats;
float *dataptr = &multimesh->data[stride * p_index + multimesh->color_floats];
float *dataptr = &multimesh->data[stride * p_index + multimesh->xform_floats];
if (multimesh->color_format == VS::MULTIMESH_COLOR_8BIT) {
union {
@ -3971,6 +3971,8 @@ Color RasterizerStorageGLES3::multimesh_instance_get_color(RID p_multimesh, int
float colf;
} cu;
cu.colf = dataptr[0];
return Color::hex(BSWAP32(cu.colu));
} else if (multimesh->color_format == VS::MULTIMESH_COLOR_FLOAT) {