OSDev.org

The Place to Start for Operating System Developers
It is currently Sun Nov 17, 2019 2:09 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Is it possible to implement the basics of OpenGL in kernel?
PostPosted: Sat Aug 31, 2019 5:06 am 
Offline
Member
Member

Joined: Sun Jul 21, 2019 7:34 am
Posts: 36
The question arose whether it would be possible to implement the basic set of OpenGL functions.
I will consider Nvidia graphics cards.
As far as I know, all implemented functions according to the OpenGL specification are on the graphics card, it remains only to find the address of the function and interact with it.

Is it possible to draw some primitive object on the screen using OpenGL, protected mode and graphic mode?


Top
 Profile  
 
 Post subject: Re: Is it possible to implement the basics of OpenGL in kern
PostPosted: Sat Aug 31, 2019 6:49 am 
Offline

Joined: Sun Jul 14, 2019 4:27 pm
Posts: 22
Literally anything could be in kernel. MS used to render the mouse cursor in kernel.


Top
 Profile  
 
 Post subject: Re: Is it possible to implement the basics of OpenGL in kern
PostPosted: Sat Aug 31, 2019 7:27 am 
Offline
Member
Member

Joined: Sun Jul 21, 2019 7:34 am
Posts: 36
GMorgan wrote:
Literally anything could be in kernel. MS used to render the mouse cursor in kernel.

How to do it?


Top
 Profile  
 
 Post subject: Re: Is it possible to implement the basics of OpenGL in kern
PostPosted: Mon Sep 02, 2019 2:31 am 
Offline
Member
Member

Joined: Thu May 17, 2007 1:27 pm
Posts: 624
OpenGL is not implemented in the graphics card, it is implemented in the graphics card driver. It requires extensive support, including but not limited to: a VRAM memory manager, a compiler of the shader language to the GPU's native instruction set and a command submission engine. Look into Mesa to see how a shader compiler and command buffers work on modern GPUs.

_________________
managarm: Microkernel-based OS that is capable of running a Wayland desktop
My OS-dev projects: [mlibc: Portable C library for managarm, qword, Linux, Sigma, ...] [LAI: AML interpreter] [xbstrap: Build system for OS distributions]


Top
 Profile  
 
 Post subject: Re: Is it possible to implement the basics of OpenGL in kern
PostPosted: Sat Sep 07, 2019 3:39 am 
Offline
Member
Member

Joined: Sun Jul 21, 2019 7:34 am
Posts: 36
Korona wrote:
OpenGL is not implemented in the graphics card, it is implemented in the graphics card driver. It requires extensive support, including but not limited to: a VRAM memory manager, a compiler of the shader language to the GPU's native instruction set and a command submission engine. Look into Mesa to see how a shader compiler and command buffers work on modern GPUs.


Do you think it is possible to transfer a part of Mesa to your kernel and use it?


Top
 Profile  
 
 Post subject: Re: Is it possible to implement the basics of OpenGL in kern
PostPosted: Wed Sep 11, 2019 12:30 am 
Offline
Member
Member

Joined: Wed Sep 19, 2012 3:43 am
Posts: 85
Location: The Netherlands
GMorgan wrote:
Literally anything could be in kernel. MS used to render the mouse cursor in kernel.

I'll just quote GMorgan here.

You can implement anything in kernel space. It wouldn't be terribly different from implementing in user-space.
You'd need, amongst others, dynamic memory allocation and a working C library.
Then start porting all supporting libraries to your OS, then port libmesa to your OS.


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

All times are UTC - 6 hours


Who is online

Users browsing this forum: MSN [Bot] and 26 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