Frame buffer and flickering




Frame buffer and flickering

Postby Mixony » 30. Mar 2017, 17:33

When I downloaded kayos and hardcoded 0xA0000 instead of GetFrameBuffer() call it doesnt flicker any more.
Should we call GetFrameBuffer() only once we change to some mode and store it in some variable.
Also tried hardcoding 0xA0000 in my operating system and it was much faster.
Mixony
 
Posts: 24
Joined: 12. Mar 2017, 08:18

by Advertising » 30. Mar 2017, 17:33

Advertising
 

Re: Frame buffer and flickering

Postby algorithman » 31. Mar 2017, 08:29

Yes, I also think that it's too extensive to read in values from the hardware in every iteration. It might be a good compromise to read it at the beginning of a screen update - not for every pixel that is set...

Changing the mode in the middle of a screen update would probably indicate a more serious design flaw anyways ;) and it would probably result in a half drawn screen :lol:

Again - this is just an illustration - something that kinda does what you want - something to get you started, so you can work on the more interesting stuff like the GUI framework, parallel to working on graphics drivers
User avatar
algorithman
Administrator
 
Posts: 49
Joined: 2. Mar 2017, 11:40

Re: Frame buffer and flickering

Postby obiwac » 7. Apr 2017, 15:43

I'm not sure if this is a valid answer for this topic, correct me if i'm wrong.

Why don't you do double buffering? You allocate a buffer of the amount of bytes in the video memory, you draw on that one, and you memcpy it to the actual video memory, when you want stuff to appear on the screen.
obiwac
 
Posts: 6
Joined: 19. Mar 2017, 20:07

Re: Frame buffer and flickering

Postby algorithman » 10. Apr 2017, 15:10

Yes, double buffering is also a widely used strategy to avoid flickering.
I personally prefer drawing front-to-back so that every pixel is drawn only once and isn't redrawn all the time, but that is still quite slow when large areas on the screen change and you read that value from the hardware in every iteration.
User avatar
algorithman
Administrator
 
Posts: 49
Joined: 2. Mar 2017, 11:40

Re: Frame buffer and flickering

Postby obiwac » 1. May 2017, 16:43

Well, in my os, I have double buffering, but it only updates on the pixels that have changed. That's fast, and beutiful. Btw, what do you mean by drawing front to back?
obiwac
 
Posts: 6
Joined: 19. Mar 2017, 20:07

Re: Frame buffer and flickering

Postby Mixony » 3. May 2017, 08:40

It is like you draw Top window, then other windows only in space that is not covered by the windows on top of it.
Mixony
 
Posts: 24
Joined: 12. Mar 2017, 08:18


TAGS

Return to Graphics Mode

Who is online

No registered users

cron