09-15-2025, 10:56 AM
The basic breakdown over hardware images:
1) Hardware images are basically static images. Once you make them, you can't change them.
2) The hardware screen is *always* a 32-bit screen of set pixel sizes. You can't resize it. If, as Pete mentioned, you're working in a SCREEN 0 text screen, the HARDWARE screen is going to be width * _fontwidth, height * _fontheight in size. All other screens, it's simply going to match your width and height in pixels of the screen.
3) All you can basically do is put information to the hardware layer. You don't read it back or alter it or interact with it. You simply take your finished image (built it in software if you need to draw/write on the screen), copy it to hardware, and then _PUTIMAGE or _MAPTRIANLGE to place it on the screen.
4) Once all your images are in place on the hardware screen, you have to _DISPLAY to render them and draw them.
5) Don't forget to _FreeImage when done with them, like any other image to release that handle.
Now there's a lot of stuff left out of that code above such as how x/y might change, or how the loop might become done, but what it focuses on is the steps to create your hardware image, place it on the hardware layer, and then display and free it.
It's the whole shebang of the process drawn out for you step-by-step. If you have any more questions, feel free to ask, but it really is just that simple of a set-up for basic usage. Everything else beyond is just adding bells and whistles and shortcuts or minor tweaks to the process.
1) Hardware images are basically static images. Once you make them, you can't change them.
2) The hardware screen is *always* a 32-bit screen of set pixel sizes. You can't resize it. If, as Pete mentioned, you're working in a SCREEN 0 text screen, the HARDWARE screen is going to be width * _fontwidth, height * _fontheight in size. All other screens, it's simply going to match your width and height in pixels of the screen.
3) All you can basically do is put information to the hardware layer. You don't read it back or alter it or interact with it. You simply take your finished image (built it in software if you need to draw/write on the screen), copy it to hardware, and then _PUTIMAGE or _MAPTRIANLGE to place it on the screen.
4) Once all your images are in place on the hardware screen, you have to _DISPLAY to render them and draw them.
5) Don't forget to _FreeImage when done with them, like any other image to release that handle.
Code: (Select All)
SCREEN _NEWIMAGE(640,480,32)
fart = _NEWIMAGE(100,100,32) 'a second image
'draw crap on your fart.
CLS, &HFFFF0000&&, fart 'I'm lazy. I just made a big red fart
'now at this point, fart is a _SOFTWARE IMAGE.
stinky_fart = _COPYIMAGE(fart, 33) 'this gives us a handle to a hardware image copy of fart
DO
_PUTIMAGE (x, y), stinky_fart 'this is all it takes. You don't need to specify a destination as all hardware images go directly to the hardware layer
_DISPLAY 'and this renders them on the screen.
LOOP UNTIL done
'free the images once you're done
_FREEIMAGE fart
_FREEIMAGE stinky_fart
Now there's a lot of stuff left out of that code above such as how x/y might change, or how the loop might become done, but what it focuses on is the steps to create your hardware image, place it on the hardware layer, and then display and free it.
It's the whole shebang of the process drawn out for you step-by-step. If you have any more questions, feel free to ask, but it really is just that simple of a set-up for basic usage. Everything else beyond is just adding bells and whistles and shortcuts or minor tweaks to the process.


