Hi.

I am familiar with the following C graphics libraries: Cairo, SDL, SDL2, and OpenGL. The problem I have found with these is that they either require shared libraries (Cairo/SDL/SDL2) or are difficult to make cross-platform (OpenGL). I am wondering if there are any graphics libraries for C that do not require the installation of any dll's or so's.

Ideally I would want the library to be extremely light-weight and fast. I do not require 3D rendering capabilities, nor advanced windowing options.

Does such a library exist?

If you want to be cross-platform, GLFW is an excellent lightweight library that handles creating OpenGL contexts, basic window management, and user input. Then it gets out of your way.

Thank you good sir!

This is exactly what I've been after. My ideal solution was OpenGL without the useless Win32 baggage that usually comes with it. GLFW appears to do just that.

The only downside is that it appears to require some compiled binaries. I understand that it might not be possible to get around this though...

Edited 1 Year Ago by Labdabeta

The only downside is that it appears to require some compiled binaries. I understand that it might not be possible to get around this though...

The only dependencies are whatever system libraries are necessary on your platform, and GLFW builds very easily from source. You can use CMake to create project files, but it's simple enough to do it manually; this is what I have done for my personal projects that use it.

OpenGL without the useless Win32 baggage

A little "gotcha" here... there are a few things that some (most?) Windows-based systems need for gl.h (e.g., having APIENTRY defined). I recommend including glfw3.h wherever you need OpenGL, even if you're only making GL calls; it takes care of the necessary bits without the overhead of including <windows.h>.

This question has already been answered. Start a new discussion instead.