Page 1 of 1

Is it possible to implement the basics of OpenGL in kernel?

Posted: Sat Aug 31, 2019 5:06 am
by mrjbom
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?

Re: Is it possible to implement the basics of OpenGL in kern

Posted: Sat Aug 31, 2019 6:49 am
by GMorgan
Literally anything could be in kernel. MS used to render the mouse cursor in kernel.

Re: Is it possible to implement the basics of OpenGL in kern

Posted: Sat Aug 31, 2019 7:27 am
by mrjbom
GMorgan wrote:Literally anything could be in kernel. MS used to render the mouse cursor in kernel.
How to do it?

Re: Is it possible to implement the basics of OpenGL in kern

Posted: Mon Sep 02, 2019 2:31 am
by Korona
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.

Re: Is it possible to implement the basics of OpenGL in kern

Posted: Sat Sep 07, 2019 3:39 am
by mrjbom
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?

Re: Is it possible to implement the basics of OpenGL in kern

Posted: Wed Sep 11, 2019 12:30 am
by FusT
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.