Is that possible to make graphics with OpenGL that works without OS ?

Hello, I want to make some graphics with c++ and OpenGL which will work on computer with nvidia gpu and intel cpu. I have windows os. I may write program in Visual stuido. That will be very simple. That will render only a 2D Square and program will be all 2D. However, I do not have any idea how that will work. Additionally, to display graphics I will need windows references to display it. I want my program display graphics at boot time without any windows reference. Is that possible and easier with Visual studio ?

Do you know of a program released in the last 20 years that displays anything “at boot time” that isn’t itself an operating system?

The days of booting into an application have long since passed. It’s completely unnecessary; it’s far more user friendly (not to mention easier to code) to just use the OS, just like everyone else.

[QUOTE=gomidas;1293617]Is that possible to make graphics with OpenGL that works without OS ? …
That will render only a 2D Square and program will be all 2D. …
I want my program display graphics at boot time without any windows reference.[/QUOTE]

The general sequence of control (and screens you typically see) when you boot a PC from a local disk is:

BIOS (and Device ROMs) -> Boot loader(s) -> OS

(we’re ignoring network/PXE boot here). It’s not clear at what stage you’re actually wanting to render this. Where? One of the first two stages, before the OS is actually loaded? Specifying where is going to define what programming constraints you have to live with.

Since you only want to draw a 2D square, then you hardly need a 3D graphics API, so you can be flexible and just use what graphics APIs are available at that stage. Which is good, because at that stage you’re probably not going to have more than basic graphics APIs available to you (such as VESA). At those stages, the GPU graphics drivers providing support for various 3D graphics APIs (including OpenGL, Vulkan, and D3D) haven’t even been loaded yet.

That said, you can render screens with 2D graphics at these early stages. Here are a few examples from years back: LINK, LINK, LINK.