Setting up SDL2 in Windows (Visual Studio)

What is the difference between SDL and SDL2?

I see references to both SDL and SDL2. What's the difference between them and which one should I use for a new project?

Abstract art representing computer programming

SDL stands for Simple DirectMedia Layer. It's a popular cross-platform library for developing applications with graphics, sound, input handling, etc.

SDL2 is the latest major version of the library. The original SDL (sometimes referred to as SDL1) is no longer actively developed. SDL2 includes many improvements and new features compared to SDL1, such as:

  • Hardware-accelerated 2D rendering
  • Support for multiple windows
  • Better Unicode support
  • Support for multiple audio devices
  • Game controller support
  • Force feedback support

For any new projects, you should use SDL2 as it represents the current version of the library. SDL1 should only be used for maintaining legacy applications.

When downloading SDL, make sure you get the SDL2 version, not the older SDL1 version. The downloads, documentation, etc. for SDL2 are all clearly marked, e.g. "SDL2-devel-2.x.x-VC.zip".

So in summary - use SDL2 for new projects, as it's the modern, supported version of the excellent SDL library.

Answers to questions are automatically generated and may not have been reviewed.

3D art representing computer programming
Part of the course:

Building Minesweeper with C++ and SDL2

Apply what we learned to build an interactive, portfolio-ready capstone project using C++ and the SDL2 library

Free, unlimited access

This course includes:

  • 37 Lessons
  • 100+ Code Samples
  • 92% Positive Reviews
  • Regularly Updated
  • Help and FAQ
Free, Unlimited Access

Professional C++

Comprehensive course covering advanced concepts, and how to use them on large-scale projects.

Screenshot from Warhammer: Total War
Screenshot from Tomb Raider
Screenshot from Jedi: Fallen Order
Contact|Privacy Policy|Terms of Use
Copyright © 2024 - All Rights Reserved