Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Hard time with hardware acceleration.
#3
Hi Steve,

Well I was working on this while you were posting.

Code: (Select All)
Dim fb.a As String
fb.a = "Button"
j = Len(fb.a)
k = btnnbr
ReDim _Preserve x(btnnbr), y(btnnbr), button$(btnnbr), bl1(btnnbr), bl2(btnnbr)
Dest = _Dest
t = _NewImage((j + 3) * 8, 4 * 16, 32)
_Dest t
Line (2, 7 + 2)-((j + 2) * 8 - 2, 16 * 2 + 7 - 2), _RGB32(0, 0, 255), B
Line (0, 7)-((j + 2) * 8, 16 * 2 + 7), _RGB32(0, 255, 0), B
Line (8, 15)-((j + 1) * 8, 16 + 15), _RGB32(255, 0, 0), B
bl1(btnnbr) = _CopyImage(t, 33)
_FreeImage t
t = _NewImage((j + 3) * 8, 4 * 16, 32)
_Dest t
Line (2, 7 + 2)-((j + 2) * 8 - 2, 16 * 2 + 7 - 2), _RGB32(255, 255, 255), BF
square = _CopyImage(t, 33)
_FreeImage t
_Dest Dest

Palette 7, 63
Do
    _Limit 30
    b$ = InKey$
    If Len(b$) Then
        If b$ = "1" Then pete = 1 - pete
        If b$ = "2" Then soft = 1 - soft
        If b$ = Chr$(27) Then System
    End If
    _PutImage (100, 100), bl1(btnnbr)
    If pete Then _PutImage (100, 80), square
    If soft Then
        Sound 1000, .1
        Color 0, 7
        Locate 8, 15
        Print Space$(6)
        Locate , 15
        Print Space$(6)
        Locate , 15
        Print Space$(6)
        Color 7, 0
    End If
    _Display
Loop

This demonstrated the "1"produces another hardware image, which correctly overlays the original. So one solution would be to convert my popup to a hardware image and display it that way. I'm not sure if that is what you are getting at, but if not, I'll think a bit on the 3-layer cake concept, in case it is different from what I thought up, from this snippet.

Pete
Reply


Messages In This Thread
Hard time with hardware acceleration. - by Pete - 03-21-2025, 06:54 PM
RE: Hard time with hardware acceleration. - by Pete - 03-21-2025, 08:04 PM



Users browsing this thread: 1 Guest(s)