user705414
user705414

Reputation: 21200

what's the relationship between SDL and OpenGL?

Anyone can tell me what's the relationship between SDL library and OpenGL library?

Upvotes: 0

Views: 309

Answers (1)

Jack
Jack

Reputation: 133577

OpenGL is a graphics library that doesn't provide any feature in addition to drawing. It is neither able to embed an OpenGL view inside a window of any modern OS.

That's where SDL comes right into place and provides all the required functions needed to create an OpenGL window in a cross-platform manner in which you then draw by using OpenGL library itself. SDL also has a lot of facilities that are almost always necessary when working with games or graphical applications like timers, management of keyboard and mouse and whatever.

In any case you could use any other OpenGL wrapper like GLUT library or GLFW to achieve the same thing: creating an OpenGL view inside an application.

Upvotes: 4

Related Questions