Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Buffering quickwin graphics

dlinn82
Beginner
592 Views
I have written a simple graphics subroutine that displays real-time results from the main program. I currently redraw the picture after clearing the screen at each point in time. This is making the graphics very choppy. I was just wondering if anybody could help me apply a buffering technique to my situation?
0 Kudos
1 Reply
Jugoslav_Dujic
Valued Contributor II
592 Views
You can't do it in QuickWin, I'm affraid. Its graphic is painfully slow and it doesn't offer buffering capabilities (there is GETIMAGE/PUTIMAGE but you have to render it on another window first so there's little to gain).

I'd suggest writing a Win32 application instead. I wrote a library called XFTGDI (part of XFTLite) which encapsulates most frequently used Win32 graphic calls and whose interface is similar to QW routines but way faster. The sample application shows how to draw in a dialog (but without double-buffering), using almost none of native Win32 calls -- it's all either DFLOGM or XFTGDI. For double-buffering, see XMemoryDC, XBitCopy, and XUpdateWindow routines in documentation.

If you'd want a window-based, not dialog-based application, you could start with GENERIC CVF sample (/Samples/Advanced/Win32/Generic directory on CVF CD), and add case(WM_PAINT) into MainWndProc; I wouldn't elaborate now -- feel free to contact me or post here if you need more info.

Jugoslav
0 Kudos
Reply