Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What simple C graphics library would you recommend? [closed]

Tags:

c

graphics

I'm learning C and I would like to start graphics programming, but start it simple, without spending hours just to understand what functions will I need.

I would like something to draw pixels, squares, maybe sprites, simple stuff, like in BASIC.

I tried SDL and got overwhelmed very quickly. Same with Allegro, it's hard to get it to work on Xcode 4 and documentation is lacking.

Maybe there is some custom one? Also would be nice if it works on Mac OS.

Any book recommendations are welcome, like simple C graphics programming or game programming, whatever.

like image 624
Dvole Avatar asked Jan 20 '23 22:01

Dvole


1 Answers

If SDL is overwhelming, perhaps graphics programming is not the place to start in C. If you want to get familiar with the concepts involved in coding up graphics, try it in a higher level language like Python (with pygame or pyglet.) Most high-level languages have good bindings to graphics libraries. If you really want to learn C by writing games, maybe something more text-oriented (ncurses-based?) is appropriate.

Once you understand the fundamental idioms of graphics programming, applying them to different languages becomes much easier. You'll be able to go from pygame to SDL in C without too much extra pain beyond that inherent in going from Python to C.

like image 137
nmichaels Avatar answered Feb 15 '23 09:02

nmichaels