Page 1 of 1

Preview getting slower and slower

Posted: Thu Jan 22, 2015 8:13 am
by rrTea
On first activation the Preview window works normally, but after that it hangs on the end of OnLoaded longer and longer, even if the program is "empty".

Just for illustration, I'm ataching the video. Here is the test code too:

Code: Select all

<?xml version="1.0" encoding="iso-8859-1" ?>
<ZApplication Name="Prg" Comment="waiter" Caption="SuperHero" ClearColor="0.4 0.85 1 1" AmbientLightColor="0.498 0.498 0.498 1" FrameRateStyle="2" FixedFrameRate="60" Camera="Projection" LightPosition="0 0 5" ViewportRatio="2" NoSound="1" PreviewClearColor="0.7529 0.7529 0.7529 1">
  <OnLoaded>
    <ZExpression>
      <Expression>
<![CDATA[trace
("OnLoaded  = COMPLETED !");]]>
      </Expression>
    </ZExpression>
  </OnLoaded>
  <OnUpdate>
    <ZExpression>
      <Expression>
<![CDATA[trace (intToStr(rnd()*100));

//Just to make sure it is
//updating...]]>
      </Expression>
    </ZExpression>
  </OnUpdate>
  <OnRender>
    <UseMaterial Material="ColorMono"/>
    <RenderMesh Mesh="Cube"/>
  </OnRender>
  <Content>
    <Camera Name="Projection" Kind="1" Position="0 -7.2654 10" Rotation="-0.1 0 0" OrthoZoom="4"/>
    <Mesh Name="Cube">
      <Producers>
        <MeshBox/>
      </Producers>
    </Mesh>
    <Material Name="ColorMono" Comment="Default: white, shaded"/>
  </Content>
</ZApplication>

Posted: Thu Jan 22, 2015 8:29 am
by VilleK
Hi,

The problem appears because I recently tried to make the preview frame rate respect App.FrameRate setting. Previously it would always be around 30fps in preview regardless of setting. I've fixed a bug related to this now, please download beta and try again.

Regards,

Ville

Posted: Thu Jan 22, 2015 8:54 am
by rrTea
Hi,

Great! It works perfectly now :)

Thanks!
Ray