| |

VerySource

 Forgot password?
 Register
Search
View: 809|Reply: 8

How to eliminate flicker

[Copy link]

3

Threads

8

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-2-18 02:30:02
| Show all posts |Read mode
[Note]: Please speak after reading

[Purpose]: My purpose is to achieve rolling captions like Jinshanbei

[Already implemented]: I use dual buffer technology to copy the memory DC to the screen DC, to achieve a single pixel level movement.

[Now problem]: Although the single pixel moves after the program is run, it still seems to flicker.

[Analysis]: I dare to analyze, the visual frequency of the human eye is 24 frames, which means that at least 24 pixels must be moved in one second (because I moved by a single pixel), but for the elephant Jinshan back word this For this kind of software, if you move too many pixels in one second, the word moves too fast, and people haven't seen it clearly ...

[Method I have tried]: Use D3D technology (because DDraw has been canceled), draw 2D text, the situation is much better, after all, it is hardware processing, but looking at the resource manager, the CPU usage of the program runs unexpectedly It's 50% and can't stand it ...

Please brainstorm.
Reply

Use magic Report

0

Threads

30

Posts

22.00

Credits

Newbie

Rank: 1

Credits
22.00

 China

Post time: 2020-4-21 22:30:01
| Show all posts
Writing assembly code directly should be the fastest ...
Reply

Use magic Report

0

Threads

24

Posts

19.00

Credits

Newbie

Rank: 1

Credits
19.00

 China

Post time: 2020-4-22 09:15:02
| Show all posts
Single pixel movement ?!
Reply

Use magic Report

3

Threads

8

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

 Author| Post time: 2020-4-22 14:00:01
| Show all posts
TO:lixiaof6471

Refers to the pixel level movement, moving forward 1 pixel at a time
Reply

Use magic Report

0

Threads

8

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-4-23 06:00:02
| Show all posts
You try the function of the middle mouse button in IE (I tried it in Firefox), in the case of multiple words, there will still be flashes, gdi is not fast enough, I said sometimes, most of the time It's fast enough. This is a doomed thing. I think if you use compilation, it's about the same CPU rate as d3d, and it seems difficult to do it if you want the horse to run and not to eat grass. In addition, the refresh rate of the computer is not 24 frames, but 30 frames. The minimum requirement for modern games is 30 to avoid flickering. In many cases of pixels, especially almost 90% of pixels like large blocks of text have to be changed, and there is no cropping technology available. Alas, this is the case, it is difficult to do not flicker. The game can do not flicker, and the cutting technique is a very important factor.
I said that, but there is no shortage of talented people, geniuses or something, and I expect someone downstairs to have genius ideas.
Reply

Use magic Report

0

Threads

8

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-4-23 07:45:01
| Show all posts
Not "not blinking" but "not dropping frames"
correct!
Reply

Use magic Report

0

Threads

59

Posts

43.00

Credits

Newbie

Rank: 1

Credits
43.00

 China

Post time: 2020-4-23 11:30:01
| Show all posts
Create a separate window, draw the text first, and then move this window.

Or you can refer to ScrollDC as a GDI function
Reply

Use magic Report

3

Threads

8

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

 Author| Post time: 2020-4-23 12:00:02
| Show all posts
Thanks for the tips from friends upstairs, I hope everyone can understand what I mean :)
Reply

Use magic Report

3

Threads

8

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

 Author| Post time: 2020-4-23 14:30:01
| Show all posts
TO:2511718
I think what you said will increase the window, resulting in a large number of OnPaint () calls, maybe ...
But I will try
Thank you
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list