Page 2 of 2

Re: Protected mode VESA programming

Posted: Fri Mar 06, 2009 6:40 pm
by purage
Are you using a third party loader, like GRUB? If so, then ignore me. Otherwise, the easiest way to start vesa programming is to set it up in your loader while still in real-mode. Then you can pass a struct to your kernel with all the vesa info you need. The only thing that makes doing this a bad idea is that you cannot offer the end-user the ability to change resolutions; not unless you do something described above as well. I suggest that you write your own loader if you haven't already. You can search for the best resolution in your loader and just derive the best one by calculating the DPI. You should know which DPI is best for your graphics since you should be the one designing them. Once you figure out how to change modes, etc.. figure out:

00. figure out how to draw .BMP images; they are the easiest, especially the 24-bit .BMPs, and you can use a color mask, so no need for transparency - difficulty level = easy
01. figure out how to move the mouse across the screen without a trail using a color mask - difficulty level = medium
02. figure out fonts - difficulty level = easy
03. figure out point and clicking specific areas on screen - difficulty level = easy
04. figure out integrating your fonts with keyboard - difficulty level = easy
05. think about dbl buffering or page flipping for big writes/refresh - difficulty level = medium

I think if you tackle these then you should have the proper foundation to complete a GUI. Maybe others can add more detail. Check the wiki for ideas.