libretro-lutro icon indicating copy to clipboard operation
libretro-lutro copied to clipboard

Is "lutro.graphics.scale" now working ?

Open VinZombie opened this issue 4 years ago • 10 comments
trafficstars

Hello, i'm trying to use the lutro.graphics.scale(scaleX, scaleY) function. Is it implemented ? Thank you in advance.

VinZombie avatar Apr 28 '21 22:04 VinZombie

Hi, it's a stub, not working for now.

kivutar avatar May 01 '21 16:05 kivutar

Thank you for the answer. Is the function possible to implement, or do I get rid of it ? Do I have to close this issue ?

VinZombie avatar May 01 '21 16:05 VinZombie

(Sorry for the bad english, I'm french)

VinZombie avatar May 01 '21 16:05 VinZombie

I'm French too so don't worry.

I think it's possible to implement it. It might be slow and work only for integer scaling, which is clearly not optimal.

By the way, what are you trying to scale? If it's the whole screen, there might be some other ways to handle things.

kivutar avatar May 02 '21 07:05 kivutar

Oh ! Only integers and slow function.... If I understand correctly, it is because Lutro is only software rendered ? Yes, it's the all screen that I try to scale. It's optional, but i want to zoom out and in slowly from a 2d isometric map made of .png and .jpg files. I don't have any idea of how to do it without a scale function... Do you have a solution ?

VinZombie avatar May 02 '21 17:05 VinZombie

Correct, Lutro is software rendered... You could scale things manually yourself?

love.graphics.draw(drawable, x, y, r, sx, sy, ox, oy, kx, ky)

I see some stuff in the painter about scaling. Haven't tested it.

RobLoach avatar May 02 '21 18:05 RobLoach

I have tested, i don't succed to make it work with love.gaphics.draw(...) Add the scale values have no effect. (Rotation doesn't have effect neither). I tried with official version from Retroarch, compiled versions on Linux and WIndows. No success.

VinZombie avatar May 02 '21 20:05 VinZombie

I also see some scaling stuff in painter which sets these two variables sx and sy. But I don't see p->trans->sx used in any of the drawing functions.

kivutar avatar May 06 '21 02:05 kivutar

@RobLoach , @kivutar , thank you for investigate ! One question, do you think it could be possible to scale with float each sprite ? Or is it limited like global scale ?

VinZombie avatar May 06 '21 13:05 VinZombie

I think it should be, stuff like SDL allow this right?

kivutar avatar Jun 05 '21 05:06 kivutar