![]() |
|
Using _MapTriangle in Small Virtual Screens - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1) +--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3) +---- Forum: Help Me! (https://qb64phoenix.com/forum/forumdisplay.php?fid=10) +---- Thread: Using _MapTriangle in Small Virtual Screens (/showthread.php?tid=3795) |
Using _MapTriangle in Small Virtual Screens - NakedApe - 07-04-2025 I'm kinda stumped. I haven't ever used _MapTriangle (except via RotoZoom), but I saw what @Petr did here (#6) and wanted to create a Star Wars-esque, parallax-looking chunk of screen to display some game info. I can't get the small, copied hardware image to display on a bigger screen no matter what I try. Also, as I wrote in the codebox, why does the "virt" hardware image persist onscreen without being in a display loop? Thanks for any help on this. Code: (Select All)
RE: Using _MapTriangle in Small Virtual Screens - SMcNeill - 07-04-2025 Looks to me like you're making a copy of the software screen, but /i don't see any point where you're clearing the software screen. Since it was already drawn upon, wouldn't the image stay upon it until you cleared it yourself? Also remember that Image is a hardware image, so it's not actually displaying on your _DISPLAY; it's displaying on its own hardware layer. That virt = _CopyImage is copying a blank screen for you, from what my brain is telling me initially, without getting out of bed and actually running and testing things on the PC personally. I'm being lazy and trying to diagnose issues while resting my poor back and playing on my iPad.
RE: Using _MapTriangle in Small Virtual Screens - NakedApe - 07-04-2025 Ahh, okay, thanks for the armchair analysis, Steve! I think I get it now. I'll noodle around and see if I can make it work. Now go back to resting your body.
RE: Using _MapTriangle in Small Virtual Screens - SMcNeill - 07-04-2025 (07-04-2025, 05:54 AM)NakedApe Wrote: Ahh, okay, thanks for the armchair analysis, Steve! I think I get it now. I'll noodle around and see if I can make it work. See if this helps explain what you're doing wrong here: Code: (Select All)
Copy that into the IDE and read over the comments. It explains the flow of what you're doing, and the changes I made to highlight those issues. What you want to do is: 1) Just make yourself a _NEWIMAGE the same size as your display screen. 2) Make a copy of that image while it's still blank. You now have two blank images to work with. 3) Draw the text on that first image normally, so you don't corrupt your display. 3) Use the first image as a reference point to _MAPTRIANGLE the desired tilt onto the second image. 4) NOW make a hardware image of that second, tilted image. 5) Free up both those temporary software screens that you no longer need. You'll now have your hardware text titled onto an image that you can _PUTIMAGE wherever you want onto your screen. (Or, over the whole screen as you do with that last _PUTIMAGE ,virt statement. RE: Using _MapTriangle in Small Virtual Screens - NakedApe - 07-04-2025 Thanks for taking the time to explain that! I’ll give it another go. Happy 4th. And +1 RE: Using _MapTriangle in Small Virtual Screens - NakedApe - 07-04-2025 Okay, Steve @SMcNeill, I've messed with this some more. What you didn't notice was that I was asking _MapTriangle to do a 3D render, which requires a hardware image to start. I can't get the resulting tilted hardware image copied to or written to a new screen - or keep it the right size - because it only seems to work when I _MapTriangle to the main screen. What the high-dilly-ho is goin on? ThanxCode: (Select All)
RE: Using _MapTriangle in Small Virtual Screens - NakedApe - 07-05-2025 OK, I got it. It helps to really read the wiki entry carefully. When I defined the "final" screen as a hardware image with _CopyImage, then it accepted the mapped triangles. All is good. RE: Using _MapTriangle in Small Virtual Screens - SMcNeill - 07-05-2025 +1 for reading the wiki and sorting it out on your own while we were fireworking, drinking, and then sleeping like drunken bears. It's amazing how few people will actually do that.
|