Drawing 24-bit rgb array

Hi All,

I have heard that drawing to the screen with SDL is the fastest way to draw.
I unfortunately need some help. My question is the following:
I have a an array of "unsigned char"s and its filled with RGB triplets and
each color being a byte long. I need a fast way to draw this image onto the
screen since each image will be part of an animation.

I haven’t been able to find any SDL functions that is able to take this
array. If somebody could provide an example of a fast and efficient way to
draw this array to screen it would very much appreciated. I tried drawing
the image to screen pixel by pixel (like as in the manual) but it seemed
slow and the image didn’t show up quiet right.

Thanks for the help in advance for this SDL newbie.

ss._________________________________________________________________
Add MSN 8 Internet Software to your current Internet access and enjoy
patented spam control and more. Get two months FREE!
http://join.msn.com/?page=dept/byoa

s s wrote:

Hi All,

I have heard that drawing to the screen with SDL is the fastest way to
draw. I unfortunately need some help. My question is the following:
I have a an array of "unsigned char"s and its filled with RGB triplets
and each color being a byte long. I need a fast way to draw this image
onto the screen since each image will be part of an animation.

I haven’t been able to find any SDL functions that is able to take this
array. If somebody could provide an example of a fast and efficient way
to draw this array to screen it would very much appreciated. I tried
drawing the image to screen pixel by pixel (like as in the manual) but
it seemed slow and the image didn’t show up quiet right.

Thanks for the help in advance for this SDL newbie.

ss.


Add MSN 8 Internet Software to your current Internet access and enjoy
patented spam control and more. Get two months FREE!
http://join.msn.com/?page=dept/byoa


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Look into SDL_CreateRGBSurfaceFrom, you can use it to create a
SDL_Surface connected to your data, and then just use the standard
blitting funtions on your data.