Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a simple library for C++ to draw to the screen?

Tags:

c++

graphics

I'm just starting out in C++ programming and I want to try creating a space invaders clone in C++, I want to avoid using game libraries and things that would solve a lot of the problems (like game loop and vector maths etc) so I can tackle these myself, but, I have no idea how to begin drawing things to a screen.

I was wondering if there's a good library I should use to simply allow myself to draw lines or graphics to the screen or whether I can do this without the use of a library?

I'd appreciate any advice,

Thanks.

like image 669
Paul Newman Avatar asked Jun 23 '10 22:06

Paul Newman


Video Answer


2 Answers

I recommend either Allegro or SDL, even though they are mostly 2D:

Allegro:
http://alleg.sourceforge.net/

SDL:
http://www.libsdl.org/

like image 175
Johannes Jensen Avatar answered Sep 30 '22 17:09

Johannes Jensen


Check out SDL.

like image 24
R Samuel Klatchko Avatar answered Sep 30 '22 19:09

R Samuel Klatchko