Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 34

Thread: Sprite flickering in 1.07b - solution found

  1. #11

    Sprite flickering in 1.07b - solution found

    No I will have to give u exe also (am preparing). That way u can be sure to see the bug :lol:

  2. #12

    Sprite flickering in 1.07b - solution found

    Well, I waiting for your demo.
    Regards
    Ijcro.

  3. #13

    Sprite flickering in 1.07b - solution found

    i will sort it in a sec. i am a bit drunk so this gonn atake longer than usual :shock:

  4. #14

    Sprite flickering in 1.07b - solution found

    And can you try like DXDraw1.TextureFilter(0) ?

    Code:
      if not DXDraw1.CanDraw then Exit;
      DXDraw1.BeginScene;
      {set texture filter explicit here}
      DXDraw1.TextureFilter(0);{0..4 - like D2D_POINT, D2D_LINEAR, D2D_FLATCUBIC, D2D_GAUSSIANCUBIC, D2D_ANISOTROPIC}
      DXImageList1.Items.Find('bckgrnd').StretchDraw(DXDraw1.Surface, Bounds(0, 0, DXDraw1.Width, DXDraw1.Height), 0);
    ....
    Ijcro.

  5. #15

    Sprite flickering in 1.07b - solution found

    ok demo is ready with exe. u will see the flicker, hopefully u can sort it somehow

    http://www.uploading.com/files/KK6D6...1.07c.rar.html

  6. #16

    Sprite flickering in 1.07b - solution found

    I tried correct it. Please try version 1.07d from my WEB.
    Ijcro.

  7. #17

    Sprite flickering in 1.07b - solution found

    Flickering bug is FIXED in 1.07d

    weldone

    -------------

    The other bug I mentioned with incorrectly drawn sprites still there , however. It only happens when do3d is set to true (or probably when hardware mode is enabled).

    I cannot test do3d on its own. As soon as I set all of the others to false and have do3d to true, i get an access violation.

  8. #18

    Sprite flickering in 1.07b - solution found

    OK. Can be demonstrate this bug in your code?

    I am preparing new version 1.08 and sprite will has new drawing functionality with blending and other effect.

    Regards
    Ijcro.

  9. #19

    Sprite flickering in 1.07b - solution found

    yes, using that demo I gave you.

    Enable do3d,dohardware,dodx7 and you will see it looks wrong compared to all set to false.

    Because that red cube is small, you will need a good eye The bug doesn't just affect sprites, it affects all drawing including Stretchdraw/draw

    Maybe you added smoothing or another effect to the drawing?

    I can prepare a larger demo?

  10. #20

    Sprite flickering in 1.07b - solution found

    Please yes, I like when you prepare demo for illustrate overwritten problem.
    I can try correct it.

    I saw in your code, that you no use attribute for hardware acceleration in DelphiX (BeginScene, EndScene). Please use prototype demo (you use threaded timer instead DXTimer), there is barebone for application. I will be prepare better prototype, because many extensions are missing (like DXInput).

    Code:
    procedure TForm1.DXTimerTimer(Sender: TObject; LagCount: Integer);
    begin
      if not DXDraw.CanDraw then Exit;
    
      DXDraw.BeginScene;
      try
        {clear surface with predefined windows color}
        DXDraw.Surface.Fill(DXDraw.Surface.ColorMatch(clBlack));
    
        //----------------------------------------------------------------------------
        {All drawing here like}
        //DXImageList.Items[0].Draw(DXDraw.surface,0,0,0);
        //----------------------------------------------------------------------------
      finally
        DXDraw.EndScene;
      end;
    
      { Draw FrameRate }
      with DXDraw.Surface.Canvas do
      try
        Brush.Style := bsClear;
        Font.Color := clWhite;
        Font.Size := 10;
        Textout(3, 3, 'FPS: ' + IntToStr(DXTimer.FrameRate));
        if doHardware in DXDraw.NowOptions then begin
          Textout(3, 14, 'Device: Hardware');
          Textout(3, DXDraw.Height-16-14, 'Change device mode to software press SPACE.')
        end
        else begin
          Textout(3, 14, 'Device: Software');
          Textout(3, DXDraw.Height-16-14, 'Change device mode to hardware press SPACE.')
        end;
        if doFullScreen in DXDraw.NowOptions then
          TextOut(3,DXDraw.Height-16,'For windowed mode press ALT+Enter.')
        else
          TextOut(3,DXDraw.Height-16,'For fullscreen press ALT+Enter.');
      finally
        Release; {  Indispensability  }
      end;
    
      DXDraw.Flip;
    end;
    Thank you for your cooperative work.

    Regards
    Ijcro.

Page 2 of 4 FirstFirst 1234 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •