Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
HW image version of this little stupid thing
#34
(09-13-2023, 03:14 AM)SMcNeill Wrote: Run the above and notice what screen mode our program is in...   then look at the code a little closer...

We're in a SCREEN 0, text-only screen mode, and yet we're still displaying and animating a graphical box across the screen pixel by pixel!!

How the BLEEP is that possible??

It's because QB64 has a completely separate and independent hardware layer, than it has for any of the software layers.  SCREEN 0 is software.  HWscreen is hardware.   The two are 100% independent from each other.

Hardware layers are always the size of the visible screen (640 x 400 pixels in this case), and are always 32-bit color screens.  It doesn't matter if you _COPYIMAGE a 256-color screen into a hardware image, it's automatically converted up to 32-bit colors.  Draw on whatever software screen which you prefer; when you're ready to turn it into a hardware image, just call _COPYIMAGE and let it automatically handle the conversion for you.

Adding `_DISPLAYORDER _HARDWARE, _SOFTWARE` above the `DO` loop is a great way to show that rendering z-order layers. This shows the software layer on top?

Switching to `_DISPLAYORDER _SOFTWARE, _HARDWARE` brings back the hardware on top?

Also should go in wiki.
grymmjack (gj!)
GitHubYouTube | Soundcloud | 16colo.rs
Reply


Messages In This Thread
RE: HW image version of this little stupid thing - by grymmjack - 09-13-2023, 09:54 AM



Users browsing this thread: 7 Guest(s)