screen:clear() bug in .12?

Discuss using and improving Lua and the Lua Player specific to the PSP.

Moderators: Shine, Insert_witty_name

Post Reply
youresam
Posts: 87
Joined: Sun Nov 06, 2005 1:43 am

screen:clear() bug in .12?

Post by youresam »

Hey everyone, I've ben using luaplayer for about 3 months now, and Im pretty good at it. However, I noticed something in version .12, screen:clear() doesnt work!

Well, it works, but only in the color black. I've tried everything,
---------
white = Color.new(255,255,255)
screen:clear(white)
--------
screen:clear(Color.new(255,255,255))
--------

But it wont clear the screen white!
I was thinking of using the screen:fillRect() function instead...

Any help?
Durante
Posts: 65
Joined: Sun Oct 02, 2005 6:07 am
Location: Austria

Post by Durante »

That's not really surprising, as the clear method in svn doesn't even use the color ;)

Code: Select all

void clearScreen(Color color)
{
        if (!initialized) return;
        guStart();
        sceGuClearDepth(0);
        sceGuClear(GU_COLOR_BUFFER_BIT|GU_DEPTH_BUFFER_BIT);
        sceGuFinish();
        sceGuSync(0, 0);
}
I guess that needs a
sceGuClearColor(color);
after the sceGuClearDepth(0);
Bob535
Posts: 56
Joined: Fri Nov 04, 2005 6:52 am

Post by Bob535 »

Hmmm, would someone let shine know so we can get this fixed in the next release? It does show in the Lua Functions that it should work just using screen:clear(color)
youresam
Posts: 87
Joined: Sun Nov 06, 2005 1:43 am

Post by youresam »

Yeah, I guess Shine missed that...
Post Reply