Translate problem in love_opengl.cpp

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
zehnan
Prole
Posts: 2
Joined: Thu Jan 22, 2009 2:06 pm
Location: Slovenia

Translate problem in love_opengl.cpp

Post 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.
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: Translate problem in love_opengl.cpp

Post by rude »

Thanks; fixed.

... but how did you know of that undocumented and ultra-secret function? :monocle:
zehnan
Prole
Posts: 2
Joined: Thu Jan 22, 2009 2:06 pm
Location: Slovenia

Re: Translate problem in love_opengl.cpp

Post by zehnan »

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


Also in this forum. ;)
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: Translate problem in love_opengl.cpp

Post by rude »

Of course. How could I forget the ancient manuscripts.
User avatar
rasjani
Prole
Posts: 22
Joined: Sun Sep 21, 2008 12:38 pm
Location: Finland
Contact:

Re: Translate problem in love_opengl.cpp

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

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 11 guests