GLBasic forum

Main forum => GLBasic - en => Topic started by: msx on 2012-Sep-20

Title: How to clean a virtual screen?
Post by: msx on 2012-Sep-20
I created two virtual screens with 'CREATESCREEN' but don't know as clean it and drawing again, maintaining transparency.
Title: Re: How to clean a virtual screen?
Post by: Darmakwolf on 2012-Sep-21
I guess what I'd do is just literally switch to the virtual screen and call clearscreen. If using a certain color with SETTRANSPARENCY, draw a rectangle over the screen with that color. It's what I've done in the past with no issues. Then you can draw whatever you'd  like to it and it should still be usable as a sprite with transparency.
Title: Re: How to clean a virtual screen?
Post by: msx on 2012-Sep-21
Already I tried it without success. I've solved it by creating a virtual screen again with the same id every time I need to clean.

I appreciate your help.
Title: Re: How to clean a virtual screen?
Post by: matchy on 2012-Sep-21
Depending on if the screen sprite size is greater than than the display size, orientation and device, drawrect with color -1 is a fine alternative for clearscreen.
Title: Re: How to clean a virtual screen?
Post by: mentalthink on 2012-Sep-21
I´not sure MSX about this, but making in example a
loadsprite "something don´t exist" whit the ID of this screen... (now I don´t rebember well the virtual Screen Command ) :-[ :-[
Title: Re: How to clean a virtual screen?
Post by: Ian Price on 2012-Sep-21
Just use DRAWRECT X,Y,W,H,RGB (R,G,B) over the old screen.
Title: Re: How to clean a virtual screen?
Post by: msx on 2012-Oct-26
I still have the same problem, I can not clean virtual screen preserving transparency. Does anyone know?
Title: Re: How to clean a virtual screen?
Post by: MrTAToad on 2012-Oct-31
Have you tried stretching a PNG sprite over it (say a 2x2 sprite) ?
Title: Re: How to clean a virtual screen?
Post by: spacefractal on 2012-Nov-01
It's a bug in glbasic. See the anti asing thread. Glbasic dosent clean and use transparency correctly with offbuffer.