[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linrad] Windows graphics



After some off-list communications with Alberto, Linrad
now writes to a memory buffer and then uses "blitting"
(The Microsoft wording for transfering a buffer) to
update the entire screen at a rate of approximately 10 Hz.

The screen update is now very fast, but the problem is not
solved because the SepPixel function is extremely slow
also on the memory bitmap. Filling a 100 by 700 pixel area
takes 2.16 seconds (3 microseconds per pixel, 300kHz) so
each SetPixel uses something like 3000 clock cycles.

In contrast, filling the screen with text takes about 10
milliseconds which is perfectly adequate for Linrad.

I have tried BitBlt to transfer one pixel at a time. It is a
little faster, it uses 60% of the time needed by SetPixel
but it is still far too slow for a reasonable implementation
of Linrad under Windows:-(

How can I put data into a memory buffer under Windows? It is
created with bitmap=CreateCompatibleBitmap(....) The data type
is then HBITMAP but I can not find out how to manipulate the
pixel data. This reference:
http://www.gamedev.net/community/forums/topic.asp?topic_id%4391&whichpage=1&#1537909
says I should convert from HBITMAP to BITMAP data type but
I can not understand how to use the information.

I am glad I started under Linux. Reasonably fast graphics under
Windows seems really complicated. I know how to manipulate
the data in a bmp file - but I do not know how to locate
where the data is stored (and maybe how to get permission
to access the data directly)

Any help is appreciated!

73

Leif / SM5BSZ







#############################################################
This message is sent to you because you are subscribed to
  the mailing list <linrad@xxxxxxxxxxxxxxxxxxxxx>.
To unsubscribe, E-mail to: <linrad-off@xxxxxxxxxxxxxxxxxxxxx>
To switch to the DIGEST mode, E-mail to <linrad-digest@xxxxxxxxxxxxxxxxxxxxx>
To switch to the INDEX mode, E-mail to <linrad-index@xxxxxxxxxxxxxxxxxxxxx>
Send administrative queries to  <linrad-request@xxxxxxxxxxxxxxxxxxxxx>

LINRADDARNIL
@