No I will have to give u exe also (am preparing). That way u can be sure to see the bug :lol:
No I will have to give u exe also (am preparing). That way u can be sure to see the bug :lol:
Well, I waiting for your demo.
Regards
Ijcro.
i will sort it in a sec. i am a bit drunk so this gonn atake longer than usual :shock:
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.
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
I tried correct it. Please try version 1.07d from my WEB.
Ijcro.
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.
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.
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?
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).
Thank you for your cooperative work.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;
Regards
Ijcro.
Bookmarks