The key difference is persistence. I don't mean you as a coder, but rather the elements you want to draw remaining persistent rather than being cleared every cycle. That's really the most significant difference. And it's not too difficult to change things to be managed under such an approach. I'll share what I do with text and sprites with some code as examples. For 'paste image', I created this function:
function PasteImageSprite(id,img,px#,py#)
if GetSpriteExists(id)=0
CreateSprite(id,img)
px#=(px#/2048.0)*100.0
py#=(py#/2048.0)*100.0
SetSpritePosition(id,px#,py#)
SetSpriteTransparency(id,1)
SetSpriteScale(id,0.048,0.027)
else
px#=(px#/2048.0)*100.0
py#=(py#/2048.0)*100.0
SetSpritePosition(id,px#,py#)
rem if already made, show sprite in this loop
SetSpriteVisible(id,1)
endif
endfunction
Now this is designed to accommodate a custom 2048X2048 render image target I use for all text and image graphics. All scaling and positioning is calibrated to set the sprite size to match the image size and place it at a specific location based on that resolution. So you'll need to modify it if you want to draw directly on a screen, with or without a virtual resolution, etc. This is just to illustrate managing multiple sprites in a 'paste image' type format. The function checks to see if the sprite already exists and if it doesn't, it creates it just like 'Paste Image' would create an paste-able image in DBPro. If it already exists, then it just places it and shows it to behave the same way. Then after it's done rendering, there's a small 'for i' loop that hides it after drawing (after Render2D/Sync/Swap). Technically, you never have to delete it at this point and can just keep it in reserve for redrawing or you can delete it to redraw it with a different image.
For text, I do something similar. I create text indexes on demand as needed, then hide them when not needed. And if I need to draw different text strings in a later loop, I reuse as many of the existing indexes as possible and just change their string values, colors, positions, etc. In fact, you don't want to draw and delete text every loop anyway as this can introduce a significant performance drop. Instead, it's best to keep as many existing indexes in place and just hide or show them when needed. Just change their string values if/when needed rather than recreating them entirely. This becomes more important the more text lines you try to draw. The text function looks something like this (using a global integer named 'TextNumber' that resets at the beginning of each loop to keep track of all text indexes being newly used for each loop and one named 'TextNumberOld' to keep track of the maximum number of indexes used to clear only the unused indexes at the end of each loop):
function TextNew(x,y,s$,r,g,b)
rem advance text number value by 1
TextNumber=TextNumber+1
rem check text index
if GetTextExists(TextNumber)=0
CreateText(TextNumber,s$)
else
SetTextString(TextNumber,s$)
SetTextVisible(TextNumber,1)
endif
SetTextSize(TextNumber,1.7)
SetTextColor(TextNumber,r,g,b,255)
rem convert to percentage for placement on 2048X2048 render image
px#=(x/2048.0)*100.0
py#=(y/2048.0)*100.0
SetTextAlignment(TextNumber,0) ` left
SetTextPosition(TextNumber,px#,py#)
endfunction
And at the end of each loop, I clear the text with this so it doesn't persist:
function ClearText()
rem hide indexes here rather than delete them
if TextNumber>0
for i = 1 to TextNumber
if GetTextExists(i)=1 then SetTextVisible(i,0)
next i
endif
rem only clear any unused text indexes for performance
if TextNumber<TextNumberOld
for i = TextNumber+1 to TextNumberOld
if GetTextExists(i)=1 then DeleteText(i)
next i
endif
rem set old text number here before trying to create or update text indexes
TextNumberOld=TextNumber
TextNumber=0
endfunction
This keeps things sorted so you don't clear/reset indexes unnecessarily, good for potentially a 20-30% performance increase if you have a text heavy render that needs frequent changes.