Skip to main content
added 82 characters in body
Source Link
Philipp
  • 123.2k
  • 28
  • 264
  • 345

SDL is a library which hides the graphics API behind a more convenient abstraction layer.

When you want to draw a sprite using the SDL library, you would call the function SDL_RenderCopy(renderer, texture, srcRect, dstRect);.

This function will then internally call the respective function of the graphics API to accomplish this. Which function of which API? That depends on the platform you are compiling your game for. When you compile for Windows, it will use Direct3D. When you compile for Linux, it will use OpenGL.

The purpose of using a library like SDL is that you no longer need to care about what graphics API is used by your game, which target platforms support which APIs and what the unique peculiarities of those APIs are. SDL hides all this behind one unified API.

However, the SDL graphics functions only do 2d graphics. When you want 3d graphics, then SDL doesn't give you much for that. So you will have to find a different solution for putting your 3d models onto the screen. But there is still some functionality of the SDL library besides graphics which can be useful for a 3d game which doesn't do its rendering through SDL:

  • Loading and parsing asset files
  • Audio playback (although the SDL audio API is rather spartanic in this regard)
  • Input handling
  • Filesystem abstraction

SDL is a library which hides the graphics API behind a more convenient abstraction layer.

When you want to draw a sprite using the SDL library, you would call the function SDL_RenderCopy(renderer, texture, srcRect, dstRect);.

This function will then internally call the respective function of the graphics API to accomplish this. Which function of which API? That depends on the platform you are compiling your game for. When you compile for Windows, it will use Direct3D. When you compile for Linux, it will use OpenGL.

The purpose of using a library like SDL is that you no longer need to care about what graphics API is used by your game, which target platforms support which APIs and what the unique peculiarities of those APIs are. SDL hides all this behind one unified API.

However, the SDL graphics functions only do 2d graphics. When you want 3d graphics, then SDL doesn't give you much for that. So you will have to find a different solution for putting your 3d models onto the screen. But there is still some functionality of the SDL library besides graphics which can be useful for a 3d game which doesn't do its rendering through SDL:

  • Loading and parsing asset files
  • Audio
  • Input
  • Filesystem abstraction

SDL is a library which hides the graphics API behind a more convenient abstraction layer.

When you want to draw a sprite using the SDL library, you would call the function SDL_RenderCopy(renderer, texture, srcRect, dstRect);.

This function will then internally call the respective function of the graphics API to accomplish this. Which function of which API? That depends on the platform you are compiling your game for. When you compile for Windows, it will use Direct3D. When you compile for Linux, it will use OpenGL.

The purpose of using a library like SDL is that you no longer need to care about what graphics API is used by your game, which target platforms support which APIs and what the unique peculiarities of those APIs are. SDL hides all this behind one unified API.

However, the SDL graphics functions only do 2d graphics. When you want 3d graphics, then SDL doesn't give you much for that. So you will have to find a different solution for putting your 3d models onto the screen. But there is still some functionality of the SDL library besides graphics which can be useful for a 3d game which doesn't do its rendering through SDL:

  • Loading and parsing asset files
  • Audio playback (although the SDL audio API is rather spartanic in this regard)
  • Input handling
  • Filesystem abstraction
fix wiki url
Source Link
user35344
user35344

SDL is a library which hides the graphics API behind a more convenient abstraction layer.

When you want to draw a sprite using the SDL library, you would call the function SDL_RenderCopy(renderer, texture, srcRect, dstRect);SDL_RenderCopy(renderer, texture, srcRect, dstRect);.

This function will then internally call the respective function of the graphics API to accomplish this. Which function of which API? That depends on the platform you are compiling your game for. When you compile for Windows, it will use Direct3D. When you compile for Linux, it will use OpenGL.

The purpose of using a library like SDL is that you no longer need to care about what graphics API is used by your game, which target platforms support which APIs and what the unique peculiarities of those APIs are. SDL hides all this behind one unified API.

However, the SDL graphics functions only do 2d graphics. When you want 3d graphics, then SDL doesn't give you much for that. So you will have to find a different solution for putting your 3d models onto the screen. But there is still some functionality of the SDL library besides graphics which can be useful for a 3d game which doesn't do its rendering through SDL:

  • Loading and parsing asset files
  • Audio
  • Input
  • Filesystem abstraction

SDL is a library which hides the graphics API behind a more convenient abstraction layer.

When you want to draw a sprite using the SDL library, you would call the function SDL_RenderCopy(renderer, texture, srcRect, dstRect);.

This function will then internally call the respective function of the graphics API to accomplish this. Which function of which API? That depends on the platform you are compiling your game for. When you compile for Windows, it will use Direct3D. When you compile for Linux, it will use OpenGL.

The purpose of using a library like SDL is that you no longer need to care about what graphics API is used by your game, which target platforms support which APIs and what the unique peculiarities of those APIs are. SDL hides all this behind one unified API.

However, the SDL graphics functions only do 2d graphics. When you want 3d graphics, then SDL doesn't give you much for that. So you will have to find a different solution for putting your 3d models onto the screen. But there is still some functionality of the SDL library besides graphics which can be useful for a 3d game which doesn't do its rendering through SDL:

  • Loading and parsing asset files
  • Audio
  • Input
  • Filesystem abstraction

SDL is a library which hides the graphics API behind a more convenient abstraction layer.

When you want to draw a sprite using the SDL library, you would call the function SDL_RenderCopy(renderer, texture, srcRect, dstRect);.

This function will then internally call the respective function of the graphics API to accomplish this. Which function of which API? That depends on the platform you are compiling your game for. When you compile for Windows, it will use Direct3D. When you compile for Linux, it will use OpenGL.

The purpose of using a library like SDL is that you no longer need to care about what graphics API is used by your game, which target platforms support which APIs and what the unique peculiarities of those APIs are. SDL hides all this behind one unified API.

However, the SDL graphics functions only do 2d graphics. When you want 3d graphics, then SDL doesn't give you much for that. So you will have to find a different solution for putting your 3d models onto the screen. But there is still some functionality of the SDL library besides graphics which can be useful for a 3d game which doesn't do its rendering through SDL:

  • Loading and parsing asset files
  • Audio
  • Input
  • Filesystem abstraction
added 4 characters in body
Source Link
Philipp
  • 123.2k
  • 28
  • 264
  • 345

SDL is a library which hides the graphics API behind a more convenient abstraction layer.

When you want to draw a sprite using the SDL library, you would call the function SDL_BlitSurface(sprite, srcRect, screen, dstRect);SDL_RenderCopy(renderer, texture, srcRect, dstRect);.

This function will then internally call the respective function of the graphics API to accomplish this. Which function of which API? That depends on the platform you are compiling your game for. When you compile for Windows, it will use Direct3D. When you compile for Linux, it will use OpenGL.

The purpose of using a library like SDL is that you no longer need to care about what graphics API is used by your game, which target platforms support which APIs and what the unique peculiarities of those APIs are. SDL hides all this behind one unified API.

However, the SDL graphics functions only do 2d graphics. When you want 3d graphics, then SDL doesn't give you much for that. So you will have to find a different solution for putting your 3d models onto the screen. But there is still some functionality of the SDL library besides graphics which can be useful for a 3d game which doesn't do its rendering through SDL:

  • Loading and parsing asset files
  • Audio
  • Input
  • Filesystem abstraction

SDL is a library which hides the graphics API behind a more convenient abstraction layer.

When you want to draw a sprite using the SDL library, you would call the function SDL_BlitSurface(sprite, srcRect, screen, dstRect);.

This function will then internally call the respective function of the graphics API to accomplish this. Which function of which API? That depends on the platform you are compiling your game for. When you compile for Windows, it will use Direct3D. When you compile for Linux, it will use OpenGL.

The purpose of using a library like SDL is that you no longer need to care about what graphics API is used by your game, which target platforms support which APIs and what the unique peculiarities of those APIs are. SDL hides all this behind one unified API.

However, the SDL graphics functions only do 2d graphics. When you want 3d graphics, then SDL doesn't give you much for that. So you will have to find a different solution for putting your 3d models onto the screen. But there is still some functionality of the SDL library besides graphics which can be useful for a 3d game which doesn't do its rendering through SDL:

  • Loading and parsing asset files
  • Audio
  • Input
  • Filesystem abstraction

SDL is a library which hides the graphics API behind a more convenient abstraction layer.

When you want to draw a sprite using the SDL library, you would call the function SDL_RenderCopy(renderer, texture, srcRect, dstRect);.

This function will then internally call the respective function of the graphics API to accomplish this. Which function of which API? That depends on the platform you are compiling your game for. When you compile for Windows, it will use Direct3D. When you compile for Linux, it will use OpenGL.

The purpose of using a library like SDL is that you no longer need to care about what graphics API is used by your game, which target platforms support which APIs and what the unique peculiarities of those APIs are. SDL hides all this behind one unified API.

However, the SDL graphics functions only do 2d graphics. When you want 3d graphics, then SDL doesn't give you much for that. So you will have to find a different solution for putting your 3d models onto the screen. But there is still some functionality of the SDL library besides graphics which can be useful for a 3d game which doesn't do its rendering through SDL:

  • Loading and parsing asset files
  • Audio
  • Input
  • Filesystem abstraction
added 318 characters in body
Source Link
Philipp
  • 123.2k
  • 28
  • 264
  • 345
Loading
added 318 characters in body
Source Link
Philipp
  • 123.2k
  • 28
  • 264
  • 345
Loading
deleted 83 characters in body
Source Link
Philipp
  • 123.2k
  • 28
  • 264
  • 345
Loading
Source Link
Philipp
  • 123.2k
  • 28
  • 264
  • 345
Loading