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

Possibly Related Threads…
Thread Author Replies Views Last Post
  Is ther a version 4.2.2 still available? astrovidiot 1 240 01-15-2026, 09:07 AM
Last Post: SMcNeill
  A funny thing happened on the way to the Forum... PhilOfPerth 4 517 10-22-2025, 12:11 AM
Last Post: madscijr
  error doing image collision detection with _MemGet madscijr 55 4,770 10-01-2025, 03:25 PM
Last Post: bplus
Photo from png tile, create symmetrical screen image hsiangch_ong 11 979 08-23-2025, 01:23 AM
Last Post: bplus
  need help printing a scaled string in a custom font to a 32-bit image madscijr 9 1,167 07-03-2025, 04:48 PM
Last Post: SMcNeill

Forum Jump:


Users browsing this thread: 1 Guest(s)