Hello,
I want to display a RGB buffer I have in memory (let's call it rgbbuf).
The buffer consist of an array of the red, green and blue values of each
pixel (red1, green1, blue1, red2, green2, blue2, red3, green3, blue3,
...). No separation are made for lines break. I just know the width (w)
and height (h) of the bitmap.
I can do it with something like :
pos = rgbbuf;
for( myY = 0; myY < h; myY++ ) {
for( myX = 0; myX < w; myX++ ) {
myColor = ((pgcolor *)pos)[ 0 ];
pos += 3;
pgSetColor( gc, myColor );
pgPixel( gc, x + myX, y + myY );
}
}
But this is slow. The slowing part is to make every time the
pgSetColor() and pgPixel(). I have try to go trough a bitmap in memory,
but without significant improvement.
In gtk, we have the function gdk_draw_rgb_image() for this.
Thanks in advance.
Olivier
--
Olivier Bornet SMARTDATA SA
[EMAIL PROTECTED] Centre du Parc
http://www.smartdata.ch av. des Pr�s-Beudin 20
Phone +41-27-723'55'03 1920 Martigny
Fax +41-27-723'55'19 Phone +41-27-723'55'18
_______________________________________________
Pgui-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/pgui-devel