mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-16 06:39:17 +00:00
TINYGL: Fixed normal array element
This commit is contained in:
parent
72db707953
commit
ff7f542846
@ -101,28 +101,28 @@ void glopArrayElement(GLContext *c, GLParam *param) {
|
|||||||
TGLfloat *array = (TGLfloat *)((TGLbyte *)c->normal_array + offset);
|
TGLfloat *array = (TGLfloat *)((TGLbyte *)c->normal_array + offset);
|
||||||
c->current_normal.X = array[0];
|
c->current_normal.X = array[0];
|
||||||
c->current_normal.Y = array[1];
|
c->current_normal.Y = array[1];
|
||||||
c->current_normal.Z = array[3];
|
c->current_normal.Z = array[2];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TGL_DOUBLE: {
|
case TGL_DOUBLE: {
|
||||||
TGLdouble *array = (TGLdouble *)((TGLbyte *)c->normal_array + offset);
|
TGLdouble *array = (TGLdouble *)((TGLbyte *)c->normal_array + offset);
|
||||||
c->current_normal.X = array[0];
|
c->current_normal.X = array[0];
|
||||||
c->current_normal.Y = array[1];
|
c->current_normal.Y = array[1];
|
||||||
c->current_normal.Z = array[3];
|
c->current_normal.Z = array[2];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TGL_INT: {
|
case TGL_INT: {
|
||||||
TGLint *array = (TGLint *)((TGLbyte *)c->normal_array + offset);
|
TGLint *array = (TGLint *)((TGLbyte *)c->normal_array + offset);
|
||||||
c->current_normal.X = array[0];
|
c->current_normal.X = array[0];
|
||||||
c->current_normal.Y = array[1];
|
c->current_normal.Y = array[1];
|
||||||
c->current_normal.Z = array[3];
|
c->current_normal.Z = array[2];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TGL_SHORT: {
|
case TGL_SHORT: {
|
||||||
TGLshort *array = (TGLshort *)((TGLbyte *)c->normal_array + offset);
|
TGLshort *array = (TGLshort *)((TGLbyte *)c->normal_array + offset);
|
||||||
c->current_normal.X = array[0];
|
c->current_normal.X = array[0];
|
||||||
c->current_normal.Y = array[1];
|
c->current_normal.Y = array[1];
|
||||||
c->current_normal.Z = array[3];
|
c->current_normal.Z = array[2];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
@ -290,7 +290,7 @@ void glopColorPointer(GLContext *c, GLParam *p) {
|
|||||||
c->color_array_size = p[1].i;
|
c->color_array_size = p[1].i;
|
||||||
c->color_array_type = p[2].i;
|
c->color_array_type = p[2].i;
|
||||||
c->color_array = p[4].p;
|
c->color_array = p[4].p;
|
||||||
switch (p[2].i) {
|
switch (c->color_array_type) {
|
||||||
case TGL_BYTE:
|
case TGL_BYTE:
|
||||||
case TGL_UNSIGNED_BYTE:
|
case TGL_UNSIGNED_BYTE:
|
||||||
c->color_array_stride = p[3].i != 0 ? p[3].i : c->color_array_stride * sizeof(TGLbyte);
|
c->color_array_stride = p[3].i != 0 ? p[3].i : c->color_array_stride * sizeof(TGLbyte);
|
||||||
|
Loading…
Reference in New Issue
Block a user