GLBasic forum

Main forum => GLBasic - en => Topic started by: MrPlow on 2017-Sep-04

Title: Createscreen
Post by: MrPlow on 2017-Sep-04
Hey guys

I am having a bit of brain freeze trying to get a Createscreen to clear for virtual screen sprite USESCREEN 1
I try to clearscreen it and drawrect to blank it but nothing works?

This is bound to be something really easy.
Title: Re: Createscreen
Post by: spacefractal on 2017-Sep-04
some code please.... Not sure what you mean.

CreateScreen was not intended to been run with each SHOWSCREEN, but more using with virtual screen and such. Its too slow.
Title: Re: Createscreen
Post by: MrPlow on 2017-Sep-04
Hi SF, your up late too!

Hard to explain - not one piece of code is fully useful for explain PSEUDO code is easier

I am using createscreen to replace GRABSPRITE

So



CREATESCREEN 0,199,ww,hh // main view scales up for mobile
CREATESCREEN 1,99,wi,he   // mini port view for small section of screen (replacing grabsprite)

USESCREEN 0 // MAIN VIEW AND SCREEN BUT WILL BE SCALED ON VIRTUAL USESCREEN
All other screen stuff
including DRAWSPRITE of Sprite 99

USESCREEN 1
Draw on mini screen

USESCREEN 0 // back to other screen


USESCREEN -1 // mobile second virtual screen
STRetchsprite 0 to full mobile display.

All is working except the clearing on the USESCREEN 1

Title: Re: Createscreen
Post by: MrPlow on 2017-Sep-04
Hope that helps explain it...
Title: Re: Createscreen
Post by: spacefractal on 2017-Sep-04
Can been property a bug. You should do a full example and report the bug. then its much easier to do. Clearscreen might not effect what set to usecreen.

Also you can uses zoomsprites, rotated sprites as well using VIEWPORT as well. etc redraw it on the small VIEWPORT screen.
Title: Re: Createscreen
Post by: MrPlow on 2017-Sep-04
OKay thanks - will keep trying to get a solution...probably something simple I need to do...
Title: Re: Createscreen
Post by: erico on 2017-Sep-05
Instead of drawrect, can you try drawing a black full screen bitmap instead?
I think I ran into this while dealing with virtual screens.

I will be back into coding this weekend and can sure take a look for you.
Title: Re: Createscreen
Post by: MrPlow on 2017-Sep-05
Thanks Erico

I had an idea that I was going to try to fill up the area with a Loop of Drawlines to clear it.
Not sure why drawrect doesn't seem work.

I am basically putting my Turtle Program on Android - Its a good fit and I redid the interface instead of typing you can add code with buttons.

Title: Re: Createscreen
Post by: MrPlow on 2017-Sep-05
Think I solved the issue...
I had two functions doing RESET of screen and placed clearing code in the wrong one.
:)