## Translate problem in love_opengl.cpp

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
zehnan
Prole
Posts: 2
Joined: Thu Jan 22, 2009 2:06 pm
Location: Slovenia

### Translate problem in love_opengl.cpp

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.

rude
Posts: 1051
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

### Re: Translate problem in love_opengl.cpp

Thanks; fixed.

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

zehnan
Prole
Posts: 2
Joined: Thu Jan 22, 2009 2:06 pm
Location: Slovenia

### Re: Translate problem in love_opengl.cpp

It was written in the old manuscripts I found while excavating the bones...

Also in this forum.

rude
Posts: 1051
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

### Re: Translate problem in love_opengl.cpp

Of course. How could I forget the ancient manuscripts.

rasjani
Prole
Posts: 22
Joined: Sun Sep 21, 2008 12:38 pm
Location: Finland
Contact:

### Re: Translate problem in love_opengl.cpp

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 ..

### Who is online

Users browsing this forum: Bing [Bot] and 32 guests