When writing directly to a screen's drawing buffer, I know that each horizontal line may have extra non-visible "padding" bytes after the end - that is what DrawingBufferPitch() is useful for.
But should I avoid writing into these padding bytes? Or is it perfectly safe?
For a very simple example, would this be a safe (although strange) way to clear a screen?
; ScreenWidth = 640
; ScreenHeight = 480
; ScreenDepth = 4 (bytes)
FillMemory(DrawingBuffer(), DrawingBufferPitch() * ScreenHeight, Color, #PB_Long)
I ask because I've had some IMA crashes around code which directly writes to the buffer. As far as I can tell, I am correctly writing to either the visible bytes or the padding bytes, nowhere else...