TINYGL: Changed the way vertices are transformed, increased performance (now it's comparable to the previous version and sometimes it performs even faster).

This commit is contained in:
Stefano Musumeci 2014-06-09 19:53:40 +02:00
parent 6c7eaca2eb
commit f40cfb020c
4 changed files with 74 additions and 78 deletions

View file

@ -74,7 +74,8 @@ void glopLight(GLContext *c, GLParam *p) {
l->specular = v;
break;
case TGL_POSITION: {
Vector4 pos = c->matrix_stack_ptr[0]->transform(v);
Vector4 pos;
c->matrix_stack_ptr[0]->transform(v, pos);
l->position = pos;