Translate problem in love_opengl.cpp
Posted: Thu Jan 22, 2009 2:15 pm
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:
should be
otherwise Z builds up and everything gets clipped away. Thanks for Löve! Best regards.
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);
}
Code: Select all
void translate(float x, float y)
{
glTranslate(x, y, 0);
}