OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 1:28 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Graphic modes
PostPosted: Mon May 22, 2023 10:33 am 
Offline

Joined: Mon May 22, 2023 10:25 am
Posts: 1
I'm playing with Rust to learn OS development basics. I was able to progress up to drawing graphics via UEFI GOP (through the uefi crate).
I'm planning to make basic window manager, maybe something slightly more advanced. Nothing serious, just curious of the OS internals.

What are my limitations when using this mode? What are the "upgrades" (in terms of image quality and other improvements) of this mode? How hard would it be to implement them? Are there good crates?


Top
 Profile  
 
 Post subject: Re: Graphic modes
PostPosted: Wed May 31, 2023 11:34 am 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5100
pgr wrote:
What are my limitations when using this mode?

I don't know what you mean by "mode" but the limitation of UEFI GOP is that it's a boot service. It's only capable of very basic operations, and you can't call it after you exit boot services. (If you ask it for a pointer to the framebuffer before you exit boot services, that pointer is still valid afterwards.) Fortunately, the framebuffer it gives you is nice enough that you can use it to display pretty much whatever you want, as long as you do all of the hard rendering work on the CPU.

pgr wrote:
What are the "upgrades" (in terms of image quality and other improvements) of this mode?

Aside from maybe selecting your display's native resolution, there's nothing you can do with GOP to improve the image quality. If you want nice features like hardware acceleration, you'll need to write a driver. Possibly more than one driver, if you want your OS to work well on more than one PC.

pgr wrote:
How hard would it be to implement them?

Pretty difficult. At least if you're targeting an Intel display adapter, most of those have pretty complete documentation.

pgr wrote:
Are there good crates?

Any crate that can help you plot pixels in a bitmap will work with the bitmap framebuffer provided by GOP. You're probably on your own when it comes to writing drivers, though.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], Kamal123 and 61 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group