1
\$\begingroup\$

I'm aware that OpenGL and DirectX are somehow programmed into my graphics card drivers initially, and I can use GLFW, SDL etc. to get access to those and manipulate them, by creating kind of different graphics objects.

Analogy:

OpenGL - programming language

SDL - framework

Please, correct me where i'm wrong.

\$\endgroup\$
7
  • \$\begingroup\$ OpenGL is not a programming language \$\endgroup\$
    – Bálint
    Dec 16 '16 at 13:27
  • \$\begingroup\$ @Bálint, yes, i know. This was just a simple analogy. \$\endgroup\$
    – Caleb
    Dec 16 '16 at 13:29
  • 1
    \$\begingroup\$ Just because it's an analogy, it doesn't need to be false. \$\endgroup\$
    – Bálint
    Dec 16 '16 at 13:32
  • 1
    \$\begingroup\$ Voting to close, "what technology to use" questions are off-topic for this stack. \$\endgroup\$
    – Vaillancourt
    Dec 16 '16 at 13:39
  • 4
    \$\begingroup\$ The explanation of what is each of this technologies could be added to the Documentation project. He is not asking what technology to use but wants to know the basic relationship of all of them. \$\endgroup\$
    – rlam12
    Dec 16 '16 at 15:03
4
\$\begingroup\$

Both OpenGL and DirectX are APIs. They serve as an interface between the GPU and the programming language.

GLFW, GLUE, and SDL (not SLD) are both frameworks with different goals. GLFW and GLUE is just a way to setup a window easily with OpenGL and DirectX, while SDL also provides some basic drawing functionality. Both if these three uses OpenGL, DirectX API's as a foundation.

Basically, APIs are the lowest level and frameworks are above them and on top are the engine's

\$\endgroup\$
5
  • \$\begingroup\$ In case i want to use DIrectX API, which framework do i use? Can SDL get access to DirectX? \$\endgroup\$
    – Caleb
    Dec 16 '16 at 13:35
  • 1
    \$\begingroup\$ @Caleb None of these. There aren't too many frameworks for DX that I know of, maybe MonoGame. \$\endgroup\$
    – Bálint
    Dec 16 '16 at 13:36
  • \$\begingroup\$ XNA or MonoGame are probably best for DirectX. Maybe SharpDX if you want a bit closer control. \$\endgroup\$
    – lozzajp
    Dec 16 '16 at 13:37
  • \$\begingroup\$ So, directX and OpenGL can also control audio and input and not only drawing graphics? Basically, DirectX is just a standart, which allows you to use API for drawing graphics, handling input, sounds ant so forth?(The same for OpenGL) \$\endgroup\$
    – Caleb
    Dec 16 '16 at 13:46
  • 1
    \$\begingroup\$ @Caleb DirectX is a collection of audio and input processing, but OpenGL in itself can't do audio, you need OpenAL for that \$\endgroup\$
    – Bálint
    Dec 16 '16 at 14:20
0
\$\begingroup\$

'glue' is sticky stuff. glu is a deprecated utility library for the old OpenGL fixed function pipeline (am ready for correction if it has been updated since back in the day).

OpenGL and DirectX (and Vulkan, Metal, ....) are graphics APIs. They offer a programming interface to the render pipeline of graphics cards. DirectX has a bit more than graphics, but is MS Windows specific. OpenGL and Vulkan are available on other platforms as well.

GLFW and SDL offer a platform independent interface to windowing and user event handling, SDL with more functionality than GLFW. Use them if you don't want to do all the window functions like sizing, resolution, user keystrokes, mouse or joystick movements, contexts in case of OpenGL by yourself and platform dependently, which can be very tedious.

What's missing in the 'toolchain' are loader libraries (GLEW belongs to that) to obtain all the function pointers and macros of the chosen API. Often they are just header files, for example for Vulkan, or glad (replacing glew) for OpenGL.

My suggestion to the OP would be to just get started. The questions will be answered automatically then.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.