Strobing output


I’ve been working on trying to convert Stefan’s Artimatix project into a reusable library.

My first attempt at making the library generic used a CRGB array inside the class and then ugly pixel by pixel copy out to the Smartmartix buffer and flip. This worked, but is wasteful of both memory and CPU.

I have now made it so the library itself can call directly to the output system to set the pixels, but got some reason, removing the copy from the CRGB to the buffer now appears to give alternating output of black and the correct image at high speed.

I can’t see why this is now happening. Any ideas?

1 Like

Using swap buffers true, prevents the strobing, but not sure if that’s making it slower now

I only skimmed your code so I might have missed something, but it looks like you’re only setting the buffer at initialization, not after every swapbuffers call. You need to use backbuffer after each swapbuffers call to get an updated pointer, like in this example:

1 Like