Page 1 of 1

Translate problem in love_opengl.cpp

Posted: Thu Jan 22, 2009 2:15 pm
by zehnan
Hi there,

I was trying to do rotations around origin in my scene graph with love.graphics.rotate and love.graphics.translate and figured out that doing two translates in a row make all draws with the current matrix disappear. I tracked down the problem to love_opengl.cpp:

Code: Select all

void translate(float x, float y)
{
	glTranslate(x, y, 1);
}
should be

Code: Select all

void translate(float x, float y)
{
	glTranslate(x, y, 0);
}
otherwise Z builds up and everything gets clipped away. Thanks for Löve! :) Best regards.

Re: Translate problem in love_opengl.cpp

Posted: Thu Jan 22, 2009 4:13 pm
by rude
Thanks; fixed.

... but how did you know of that undocumented and ultra-secret function? :monocle:

Re: Translate problem in love_opengl.cpp

Posted: Thu Jan 22, 2009 7:22 pm
by zehnan
It was written in the old manuscripts I found while excavating the bones...


Also in this forum. ;)

Re: Translate problem in love_opengl.cpp

Posted: Thu Jan 22, 2009 7:26 pm
by rude
Of course. How could I forget the ancient manuscripts.

Re: Translate problem in love_opengl.cpp

Posted: Fri Jan 30, 2009 9:46 am
by rasjani
Not a translate problem in the same file but another issue =)

love_opengl.cpp and there was another file also - has a type cast to ILvoid - this type is not available anymore in the latest version of DevIL ..