Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Initializing OpenGL without libraries

Every tutorial I find Online uses SDL or GLAD or other libraries to initialize OpenGL. Is there a way of initializing OpenGL with no extra libraries (like DirectX)?

The reason for that, Is that I am building a Game Engine and I want to minimize the external libraries as possible and to be able to handle more error messages.

like image 399
I Don't Tell My Name Avatar asked Jan 29 '23 20:01

I Don't Tell My Name


1 Answers

Initializing OpenGL differs from one operating system to another, that's why people made these libraries to ease other developers work.

Some tutorials that will help you.

For Windows (WGL)

  • https://www.khronos.org/opengl/wiki/Creating_an_OpenGL_Context
  • http://www.rastertek.com/gl40tut03.html

For Linux (GLX)

  • https://www.khronos.org/opengl/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)
like image 92
Zlixine Avatar answered Feb 05 '23 04:02

Zlixine