<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Double buffering for Animation in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Double-buffering-for-Animation/m-p/947543#M18668</link>
    <description>I can't seem to locate routines for double buffering.  Is this possible with Quickwin?  Or, is ther another means to create animation? &lt;BR /&gt; &lt;BR /&gt;Rudy</description>
    <pubDate>Tue, 10 Apr 2001 11:59:27 GMT</pubDate>
    <dc:creator>Intel_C_Intel</dc:creator>
    <dc:date>2001-04-10T11:59:27Z</dc:date>
    <item>
      <title>Double buffering for Animation</title>
      <link>https://community.intel.com/t5/Software-Archive/Double-buffering-for-Animation/m-p/947543#M18668</link>
      <description>I can't seem to locate routines for double buffering.  Is this possible with Quickwin?  Or, is ther another means to create animation? &lt;BR /&gt; &lt;BR /&gt;Rudy</description>
      <pubDate>Tue, 10 Apr 2001 11:59:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Double-buffering-for-Animation/m-p/947543#M18668</guid>
      <dc:creator>Intel_C_Intel</dc:creator>
      <dc:date>2001-04-10T11:59:27Z</dc:date>
    </item>
    <item>
      <title>Re: Double buffering for Animation</title>
      <link>https://community.intel.com/t5/Software-Archive/Double-buffering-for-Animation/m-p/947544#M18669</link>
      <description>You can't do double buffering with QuickWin; more precisely, &lt;BR /&gt;you can, but you'll have to attach a Win32-handled window or dialog; &lt;BR /&gt;with QuickWin child windows it's not possible since they're already &lt;BR /&gt;double-buffered internally by QuickWin framework. Perhaps you could subclass a QW child window, intercepting WM_PAINT and WM_ERASEBKGND messages, doing your own painting (double-buffered); &lt;BR /&gt;I did try subclassing, but without intercepting these two messages, so I can't tell you whether there are some gotchas.  &lt;BR /&gt; &lt;BR /&gt;Well, the answers above are rather general -- I'm willing to explain &lt;BR /&gt;in more detail, but please provide more details on required window size, animation speed and GUI requirements.  &lt;BR /&gt; &lt;BR /&gt;Regards&lt;BR /&gt; &lt;BR /&gt;Jugoslav</description>
      <pubDate>Tue, 10 Apr 2001 18:18:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Double-buffering-for-Animation/m-p/947544#M18669</guid>
      <dc:creator>Jugoslav_Dujic</dc:creator>
      <dc:date>2001-04-10T18:18:05Z</dc:date>
    </item>
    <item>
      <title>Re: Double buffering for Animation</title>
      <link>https://community.intel.com/t5/Software-Archive/Double-buffering-for-Animation/m-p/947545#M18670</link>
      <description>multiple window dialog: 1 frame,1 dialog, 1 graphics.  The current speed is fast, but there is a flicker.  I don't think speed is an issue.</description>
      <pubDate>Wed, 11 Apr 2001 01:11:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Double-buffering-for-Animation/m-p/947545#M18670</guid>
      <dc:creator>Intel_C_Intel</dc:creator>
      <dc:date>2001-04-11T01:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: Double buffering for Animation</title>
      <link>https://community.intel.com/t5/Software-Archive/Double-buffering-for-Animation/m-p/947546#M18671</link>
      <description>Sorry, I still don't get what you mean by "multiple window dialog". Should the animation be placed in QW child window(s) or a dialog box? &lt;BR /&gt; &lt;BR /&gt;Re-thinking about that, you might construct an (almost) pure QW solution &lt;BR /&gt;using GetImage/PutImage in child windows. This wouldn't be probably as  &lt;BR /&gt;fast as Win32 solution, but if speed is not an issue, it may work OK. &lt;BR /&gt;First, create a dummy QW child window (OPEN(55,FILE='User')). Do a SetWindowConfig of appropriate size. Then, move it somewhere where it won't be visible: &lt;BR /&gt; &lt;BR /&gt;&lt;FONT size="+0"&gt;&lt;PRE&gt; 
USE DFWIN 
hDummyWnd=GetHWNDQQ(55) 
iSt=MoveWindow(hDummyWnd,-1,-1,0,0) 
&lt;/PRE&gt;&lt;/FONT&gt; &lt;BR /&gt; &lt;BR /&gt;Then, do the drawing on that window (SetActiveQQ(55), then draw whatever necessary). When you finish drawing, use GetImage to &lt;BR /&gt;copy its contents into a previously allocated memory buffer, SetActiveQQ(iDestinationUnit) and PutImage onto it.  &lt;BR /&gt; &lt;BR /&gt;Timing of that procedure can be an issue. The purest way woud be &lt;BR /&gt;to place drawing+copying procedure as a callback for a timer: &lt;BR /&gt;&lt;FONT size="+0"&gt;&lt;PRE&gt; 
USE DFWIN 
INTERFACE 
      SUBROUTINE MyAnimationProc(hWnd, Msg, ID, iTime) 
      !DEC$ATTRIBUTES STDCALL:: MyAnimationProc 
      INTEGER:: hWnd, Msg, ID, iTime 
END INTERFACE 
 
!A timer set to 100 ms 
iSt=SetTimer(NULL, 0, 100, LOC(MyAnimationProc)) 
!======================================== 
SUBROUTINE MyAnimationProc(hWnd, Msg, ID, iTime) 
!DEC$ATTRIBUTES STDCALL:: MyAnimationProc 
INTEGER:: hWnd, Msg, ID, iTime 
INTEGER(1), ALLOCATABLE::     iBuffer(:) 
 
iSt=SetActiveQQ(55) 
iSt=Rectangle(...) 
... 
iSize=GetImageSize(1,1,100,100) 
ALLOCATE(iBuffer(iSize)) 
 
CALL GetImage(1,1,100,100,iBuffer) 
iSt=SetActiveQQ(11) 
CALL PutImage(1,1,iBuffer,$GPSET) 
DEALLOCATE(iBuffer) 
&lt;/PRE&gt;&lt;/FONT&gt; &lt;BR /&gt; &lt;BR /&gt;Well, if you need it in a dialog, that's another issue. &lt;BR /&gt; &lt;BR /&gt;Jugoslav</description>
      <pubDate>Wed, 11 Apr 2001 20:18:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Double-buffering-for-Animation/m-p/947546#M18671</guid>
      <dc:creator>Jugoslav_Dujic</dc:creator>
      <dc:date>2001-04-11T20:18:09Z</dc:date>
    </item>
  </channel>
</rss>

