Good API to learn

Hi everyone, so basically i'm looking for a good API for a beginner, i just finished studying C++ and now i want to start studying Graphics, which of these following APIs would be most preferable for someone who has absolutely 0% experience in Graphics:

-SDL
-Allegro
-Directx
-Direct3d
-OpenGL

Thank you very much for reading.

SFML
closed account (jwkNwA7f)
I don't know for a beginner, but I have just started using DirectX (3d also) and It looks great to me.

Hope this helped!
closed account (S6k9GNh0)
OpenGL since it's the only cross-platform solution for hardware rendering.

As for Windowing, couldn't care less. SFML, SDL, Allegro, GLFW are all fine. They're mildly easy to replace as well with some basic planning.
For general graphics programming I'd suggest OpenGL, too.

For Windows GUI graphics stuff have a look at GDI or even better GDI+ which is C++ and pretty nice to use, even in non-.NET projects.
OpenGL and SFML because they integrate with each other so easily. SFML is a breeze to learn, it should take an intermediate programmer a matter of months (depending on the amount of spare time you have) to become proficient with it. It is also built to support OpenGL so it's not a waste if you want to do 3-D programming afterward.
closed account (N36fSL3A)
OpenGL since it's the only cross-platform solution for hardware rendering.
lel

SDL has hardware rendering.

OpenGL and SFML because they integrate with each other so easily.
So does SDL.

I'd say SDL, its small and lightweight, and I made a simple game within a few weeks.

When learning OpenGL DO NOT use GLUT at all. Use the either SFML or SDL.
Last edited on
closed account (S6k9GNh0)
High.

SDL uses OpenGL as a backend. It's how it achieves hardware rendering.. of which it expects you to use OpenGL directly or through a renderer anyways for anything more than simple.

Also, nothing wrong with GLUT as long as you use FreeGLUT.
closed account (N36fSL3A)
FreeGLUT/GLUT's really not meant for large projects.

SDL uses OpenGL as a backend.
It uses DirectX on Windows :)

But you're mostly right.
There is nothing wrong with (Free)GLUT except that it does a haphazard job of fulfilling a role that either SDL or SFML do better. Navigating the repository and documentation for FreeGLUT is enough aggravation for me to say don't bother with it. I agree with Fred on this one.
closed account (S6k9GNh0)
There is something wrong with GLUT. Using GLUT in a large project is a license issue and has an olded and dated interface. FreeGLUT has made additions while keeping compatibility to the older GLUT. There's no reason it cannot be used in larger projects.

If you can provide me a tad bit of technical evidence other wise, I might agree!

@ Computergeek01, SDL, up until literally 3 or 4 days ago, has had some of the most poorly documented interfaces I've ever seen. I don't really get how the documentation for FreeGLUT would aggravate you over SDL.
closed account (N36fSL3A)
Computergeek01, SDL, up until literally 3 or 4 days ago, has had some of the most poorly documented interfaces I've ever seen.
Pretty good for me.

Anyway the large amount of tutorials available online should make up for the 'poorly documented API'.

closed account (S6k9GNh0)
You ignored the point. It was hardly about how bad the SDL documentation is (although it does help my point) but rather the claim that FreeGLUT documentation is bad, thus making it bad for large projects or bad for use in general in comparison to OpenGL. There's little to support these summarized claims. EDIT: Or perhaps you're trying to say that there's some other reason it's not viable be it for large projects or not. There's not even an argument here. The burden of proof is on you.

Also, SDL docs were good enough for you? Strange... some of the docs were completely missing, some were even wrong. There were even docs about features and functions that weren't even implemented and/or don't exist.
Last edited on
closed account (N36fSL3A)
that weren't even implemented and/or don't exist.
Well I didn't notice if that's the case.

Don't forget SDL gives you a image loading function. Not that hard to convert it to a glTexture.

(Besides .pngs. They load but the pixel data is flipped.)
I'll admit, I don't use SDL. But it wasn't because I didn't like the documentation or website or anything about it, I just liked SFML better. I know I didn't like FreeGLUT because of the layout of the website and that it doesn't really offer anything that I would use and SFML can't handle.
closed account (N36fSL3A)
^Same way I feel about SDL.

The problem is, I don't want to leave SDL and learn another library because I love it so much. :(

There's a reason OpenGL has SFML/SDL on their pages. They are basically saying freeGLUT isn't the best and they recommend these...
Last edited on
closed account (S6k9GNh0)
Actually, SFML isn't on their pages. GLUT is on their main Utility page and is there default recommended toolkit as it's simple. I believe they are actually referring to toolkit updated by Apple, not the outdated one. SDL is also considered "an alternative'.

http://www.opengl.org/resources/libraries/windowtoolkits/
closed account (N36fSL3A)
I know SFML isn't on their pages I didn't want them to feel left out :P
closed account (S6k9GNh0)
Also, understand that FreeGLUT and GLUT are two different things. GLUT is probably now referring to the toolkit now maintained by Apple. FreeGLUT on the other hand is an extended API from a seperate group forked several years ago. GLUT, last I checked, still uses the same API and the only "updates" given are those that cause misfunction or to maintain against changes in the windowing system.
Topic archived. No new replies allowed.