Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

I programmed a textbox (or anything done from JavaScript used to draw on the screen) but nothing appears; Whats going on?

0
10 Posted

I programmed a textbox (or anything done from JavaScript used to draw on the screen) but nothing appears; Whats going on?

0
10

When you draw something to the screen in Sphere, what you’re really doing is drawing it to a chunk of memory allocated for drawing functions, called the back-buffer. In order to make what’s on the back-buffer appear on the screen, you have to “flip” it, using FlipScreen(). Make sure that at the end of any bit of drawing code that you want on screen, to include a FlipScreen(). It should be noted that the contents of the back-buffer are undefined after a FlipScreen(), so you should never rely on the contents. You’ll have to redraw everything each time. (Seems like a pain in the ass, but it actually forces you to write more dynamic code, which can lead to less problems overall.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123