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...

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>.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.