Page 1 of 1

Windowing Systems by Example: 1 - Complicated Rectangles

Posted: Wed Aug 17, 2016 8:01 am
by jojo
http://www.trackze.ro/wsbe-complicated-rectangles/

Today, we start writing our first code in both JS and C to render some rather over-engineered rectangle objects to our framebuffer in order to lay the groundwork for something much more interesting.

Re: Windowing Systems by Example: 1 - Complicated Rectangles

Posted: Wed Aug 17, 2016 8:23 am
by Octacone
jojo wrote:http://www.trackze.ro/wsbe-complicated-rectangles/

Today, we start writing our first code in both JS and C to render some rather over-engineered rectangle objects to our framebuffer in order to lay the groundwork for something much more interesting.

Code: Select all

You should change "Complicated" to "Simple". :D
This tutorial was extremely easy to follow. I am just wondering how are you going to introduce the input compatibility, not everybody has the same linear frame buffer or PS/2 driver. 

Re: Windowing Systems by Example: 1 - Complicated Rectangles

Posted: Wed Aug 17, 2016 8:52 am
by jojo
The simple answer is abstraction.

Firstly, there's a lot of groundwork to cover before we even start playing with the mouse yet. But this is something that I'll be addressing in particular when the time comes. However, we're going to make the not-unrealistic assumption that you have written your mouse driver (and if not, will be linking to the ps2 mouse wiki article) and can either poll the mouse in the application thread or wait for mouse messages passed from the kernel or another thread. Either way, it doesn't really matter because we'll be abstracting that as a function that you yourself have to worry about the implementation of which will sit in our event loop.

So, that's the mouse, and your concern is well placed. But, to be blunt on the framebuffer, I don't see that as an issue. If you're working on a system built within the last decade and a half or so, you have access to a linear framebuffer via VESA, and it's by far the most compatible route. If you're toggling VGA registers, that's below the scope of this series. If you're screwing with some complicated hardware acceleration interface, that's above the scope of the series.

All of that said, I really thank you for your ongoing feedback. I kept this one really short and simple because I had gotten complaints about the previous rant being too long (which probably had more to do with its length in the context of its content than anything else) and was worried about making this one a similar slog. I've pretty obviously never done this kind of writing before, so I appreciate your patience and actually spending time looking at my work and giving me your criticism since that's totally critical in helping me find my way into that happy medium.

Re: Windowing Systems by Example: 1 - Complicated Rectangles

Posted: Thu Aug 18, 2016 3:12 am
by DevilGladiator
jojo wrote:http://www.trackze.ro/wsbe-complicated-rectangles/

Today, we start writing our first code in both JS and C to render some rather over-engineered rectangle objects to our framebuffer in order to lay the groundwork for something much more interesting.
I have checked it out and i have to say that it was an easy to follow tutorial also i have to say that it's nice to see some tutorials about gui and that i would love to see more in the future :wink: , keep going on like this,

Re: Windowing Systems by Example: 1 - Complicated Rectangles

Posted: Thu Aug 18, 2016 11:11 am
by jojo
Thanks for the words of encouragement, DevilGladiator. I really appreciate it, and I certainly intend to continue plowing forward!

Re: Windowing Systems by Example: 1 - Complicated Rectangles

Posted: Sat Aug 20, 2016 6:45 pm
by jojo
Just wanted to update this for anyone that's been following: Due to popular demand, I have updated my code and my last article to only cover implementation in C. I also think this version is also just a way better article, so check it out!

http://trackze.ro/wsbe-complicated-rectangles/