Want to move onto a graphics library

Started by
15 comments, last by Fredericvo 9 years, 9 months ago

Hello all,

I've just joined the site so I hope that I am posting in the correct forum. If not, then I am terribly sorry for the trouble.

I have a question for those who are wise about programming libraries like DirectX, SDL and OpenGL. I have been programming in C++ for almost 4 years now and understand the basics, including the STL. I have picked up a book on DirectX and SDL and understand the code inside them. I think I am ready for moving onto a library to begin using graphics. I also know and understand how to build a Window using the Windows API.

My question is this: What library is the best (not so much easiest) to begin with? I have no hopes of designing a game. I just wish to mess around with the graphics, input, sound, etc. so I obtain a better understanding of how it works and how to write it.

Thank you,

Lewis

Advertisement


My question is this: What library is the best (not so much easiest) to begin with? I have no hopes of designing a game. I just wish to mess around with the graphics, input, sound, etc. so I obtain a better understanding of how it works and how to write it.

Based on this, you want a multi-purpose library, and not just a graphics library. OpenGL is purely a graphics library, so doesn't handle sound and input.

DirectX can handle all of these, but then you're limited to Windows only.

There are three widely used cross-platform libraries: SDL, Allegro, and SFML. The first two are C libraries, and SFML is C++. They all have similar APIs and learning curves.

The best for you depends on what you want. If you don't care about cross-platform and are using Windows, then DirectX is probably the best choice as there is a great deal of documentation for it, both online and in book form. If you do want cross-platform support, then it depends on if you want a C++ library or a C library.

I am a beginner in this field so I am just learning. In my C++ course I was always told that once you have one language down then others follow easier. Isn't this the same for libraries? If so, I am not that worried. I just want to get some knowledge to one day create a VERY basic game.

Thank you for your reply,

Lewis.

You can use the C libraries in C++. In fact I use Allegro myself with C++. Some people just prefer a library that was built with C++ in mind from the ground up.

I am a beginner in this field so I am just learning. In my C++ course I was always told that once you have one language down then others follow easier. Isn't this the same for libraries? If so, I am not that worried. I just want to get some knowledge to one day create a VERY basic game.

Thank you for your reply,

Lewis.

That's very true.

Allegro, SDL and GLFW cover what you need. Any of those would be suitable.

My 2cc: use SDL2.

Moving to any other library will be trivial once you get the hang of it.

[OpenTK: C# OpenGL 4.4, OpenGL ES 3.0 and OpenAL 1.1. Now with Linux/KMS support!]

Thank you very much for the information. May I ask one other question?

How do I include the .lib files to Visual Studio for SLD2?

In your project properties (alt-enter), under Linker / Input / Additional Dependencies

[OpenTK: C# OpenGL 4.4, OpenGL ES 3.0 and OpenAL 1.1. Now with Linux/KMS support!]

I recommend SFML.

I'm a game programmer and computer science ninja !

Here's my 2D RPG-Ish Platformer Programmed in Python + Pygame, with a Custom Level Editor and Rendering System!

Here's my Custom IDE / Debugger Programmed in Pure Python and Designed from the Ground Up for Programming Education!

Want to ask about Python, Flask, wxPython, Pygame, C++, HTML5, CSS3, Javascript, jQuery, C++, Vimscript, SFML 1.6 / 2.0, or anything else? Recruiting for a game development team and need a passionate programmer? Just want to talk about programming? Email me here:

hobohm.business@gmail.com

or Personal-Message me on here !

How do I include the .lib files to Visual Studio for SLD2?


http://www.libsdl.org/tmp/SDL/VisualC.html

Sean Middleditch – Game Systems Engineer – Join my team!

How do I include the .lib files to Visual Studio for SLD2?

#pragma comment(lib,'SDL2.lib')
#pragma comment(lib,'SDL2main.lib')

This topic is closed to new replies.

Advertisement