Page 1 of 1

Graphics in OS

Posted: Wed Feb 13, 2019 3:16 pm
by Shvets04
I am developing OS. I've made a bootloader, and simple kernel. How can i achieve graphics like in modern operating system?

Re: Graphics in OS

Posted: Thu Feb 14, 2019 1:01 am
by MollenOS
To put it in simple terms, based on how you formatted your questions; You won't.

To achieve graphics like in modern operating systems without spending several years developing graphic drivers, and even should you do that, then the driver you've developed would be obsolete before you finished.

Now, if you simply mean high resolution graphics, I suggest you look into VBE/VESA where you can switch modes (during boot is simplest, as you can use bios interrupts) and get a handle to a framebuffer where you can draw pixels. There are plenty of resources online, on this forum and search on our osdev wiki.

Re: Graphics in OS

Posted: Fri Feb 15, 2019 4:22 am
by SpyderTL
If you are still running in 16-bit Real Mode, then you can use the BIOS to switch video modes to a specific graphics mode (mode 13h), or you can define your own. (i.e. 1024x768x32)

However, as long as you are in 16-bit Real Mode, you are going to be extremely limited in what you can do once you are in graphics mode. So, you may want to consider switching to a specific graphics mode, and then switching to 32-bit protected mode.

You can find more information on the wiki pages: How do I set a graphics mode