OSDev.org
https://forum.osdev.org/

Is it possible to implement the basics of OpenGL in kernel?
https://forum.osdev.org/viewtopic.php?f=1&t=34120
Page 1 of 1

Author:  mrjbom [ Sat Aug 31, 2019 5:06 am ]
Post subject:  Is it possible to implement the basics of OpenGL in kernel?

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?

Author:  GMorgan [ Sat Aug 31, 2019 6:49 am ]
Post subject:  Re: Is it possible to implement the basics of OpenGL in kern

Literally anything could be in kernel. MS used to render the mouse cursor in kernel.

Author:  mrjbom [ Sat Aug 31, 2019 7:27 am ]
Post subject:  Re: Is it possible to implement the basics of OpenGL in kern

GMorgan wrote:
Literally anything could be in kernel. MS used to render the mouse cursor in kernel.

How to do it?

Author:  Korona [ Mon Sep 02, 2019 2:31 am ]
Post subject:  Re: Is it possible to implement the basics of OpenGL in kern

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.

Author:  mrjbom [ Sat Sep 07, 2019 3:39 am ]
Post subject:  Re: Is it possible to implement the basics of OpenGL in kern

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?

Author:  FusT [ Wed Sep 11, 2019 12:30 am ]
Post subject:  Re: Is it possible to implement the basics of OpenGL in kern

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.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/