texturer.h 754 B

12345678910111213141516171819202122
  1. //
  2. // Created by jovian on 16/07/17.
  3. //
  4. #ifndef HELLOSDL_TEXTURER_H
  5. #define HELLOSDL_TEXTURER_H
  6. #include <iostream>
  7. #include <SDL.h>
  8. #include <SDL_image.h>
  9. void logSDLError(std::ostream &os, const std::string &msg);
  10. SDL_Texture* loadTexture(const std::string &file, SDL_Renderer *ren);
  11. void renderTexture(SDL_Texture *tex, SDL_Renderer *ren, int x, int y, bool centered = false);
  12. void renderTexture(SDL_Texture *tex, SDL_Renderer *ren, int x, int y, int w, int h, bool centered = false);
  13. void renderTexture(SDL_Texture *tex, SDL_Renderer *ren, int x, int y, double angle, bool centered = false);
  14. void renderTexture(SDL_Texture *tex, SDL_Renderer *ren, int x, int y, double angle, int w, int h, bool centered = false);
  15. #endif //HELLOSDL_TEXTURER_H