SFML community forums

Help => Graphics => Topic started by: Zamadatix on December 07, 2010, 02:15:35 am

Title: Fastest way of drawing a matrix
Post by: Zamadatix on December 07, 2010, 02:15:35 am
Let's say that I have a matrix of color values, each color represents a type of data that the CPU calculates and changes the matrix accordingly each frame. What is the fastest way to get this matrix to drawn on the screen as a sprite?
Title: Fastest way of drawing a matrix
Post by: Laurent on December 07, 2010, 07:58:52 am
Use a sf::Image and its LoadFromPixels function to update it from your array of colors.