OSDev.org https://forum.osdev.org/ |
|
Graph too slow. Seriously? https://forum.osdev.org/viewtopic.php?f=13&t=31323 |
Page 1 of 1 |
Author: | monobogdan [ Mon Jan 30, 2017 12:46 pm ] |
Post subject: | Graph too slow. Seriously? |
Pascal Graph functions is slow. Slow like ah=9ch. But why? It must be fast because write direct in video memory |
Author: | Schol-R-LEA [ Mon Jan 30, 2017 1:15 pm ] |
Post subject: | Re: Graph too slow. Seriously? |
monobogdan wrote: Pascal Graph functions is slow. Slow like ah=9ch. But why? It must be fast because write direct in video memory We would really need more details about this. Which library do you mean (I am expecting you meant your own, but I don't want to assume)? What OS platform and compiler (ditto for both)? What sort of graphics (or did you mean 'graphing', which would be somewhat different)? How is it implemented? If you can provide the source code (or better still, a link to the repo the source is in), it would also help a great deal. |
Author: | monobogdan [ Mon Jan 30, 2017 1:34 pm ] |
Post subject: | Re: Graph too slow. Seriously? |
Schol-R-LEA wrote: monobogdan wrote: Pascal Graph functions is slow. Slow like ah=9ch. But why? It must be fast because write direct in video memory We would really need more details about this. Which library do you mean (I am expecting you meant your own, but I don't want to assume)? What OS platform and compiler (ditto for both)? What sort of graphics (or did you mean 'graphing', which would be somewhat different)? How is it implemented? If you can provide the source code (or better still, a link to the repo the source is in), it would also help a great deal. I mean unit graph built in pascal. It's VESA wrapper. |
Author: | monobogdan [ Mon Jan 30, 2017 1:55 pm ] |
Post subject: | Re: Graph too slow. Seriously? |
So, it's really too slow. Is really VESA slow? Code: Code: while true do
begin DrawDesktop; DrawStatusPanel; DrawTime; DrawRect(GetMouseX, GetMouseY, GetMouseX + 5, GetMouseY +5, 1); end; |
Author: | monobogdan [ Mon Jan 30, 2017 1:56 pm ] |
Post subject: | Re: Graph too slow. Seriously? |
monobogdan wrote: So, it's really too slow. Is really VESA slow? Code: Code: while true do begin DrawDesktop; DrawStatusPanel; DrawTime; DrawRect(GetMouseX, GetMouseY, GetMouseX + 5, GetMouseY +5, 1); end; DrawDesktop, DrawStatusPanel, DrawTime is internal functions, it's draw rects and lines. |
Author: | nielsd [ Mon Jan 30, 2017 2:19 pm ] |
Post subject: | Re: Graph too slow. Seriously? |
I don't know how DrawDesktop and DrawStatusPanel etc are implemented, but I think the real problem is in there. Don't redraw the whole desktop constantly, only draw the changed parts since previous drawing time. Also you probably don't want to keep looping and drawing, but just check if there's something to draw that has changed. |
Author: | hannah [ Mon Jan 30, 2017 2:19 pm ] |
Post subject: | Re: Graph too slow. Seriously? |
What does DrawRect do? |
Author: | Schol-R-LEA [ Mon Jan 30, 2017 2:58 pm ] |
Post subject: | Re: Graph too slow. Seriously? |
I agree with ndke (and Brendan in the other thread) here; I recommend reading up on Double Buffering and blitting before you proceed. Generally speaking, you want to do something like the following:
This is a general sketch, and will need to be adapted to how you intend your OS to work. |
Author: | matt11235 [ Mon Jan 30, 2017 3:04 pm ] |
Post subject: | Re: Graph too slow. Seriously? |
monobogdan wrote: Is really VESA slow? I think that writing to video memory is just incredibly slow.
|
Page 1 of 1 | All times are UTC - 6 hours |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |