libAlgAudio  v1.99-440-g08538e5-dirty
The development library for AlgAudio framework.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SDLFix.hpp
Go to the documentation of this file.
1 #ifndef SDLFIX_HPP
2 #define SDLFIX_HPP
3 /*
4 This file is part of AlgAudio.
5 
6 AlgAudio, Copyright (C) 2015 CeTA - Audiovisual Technology Center
7 
8 AlgAudio is free software: you can redistribute it and/or modify
9 it under the terms of the GNU Lesser General Public License as
10 published by the Free Software Foundation, either version 3 of the
11 License, or (at your option) any later version.
12 
13 AlgAudio is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU Lesser General Public License for more details.
17 
18 You should have received a copy of the GNU Lesser General Public License
19 along with AlgAudio. If not, see <http://www.gnu.org/licenses/>.
20 */
21 
22 struct SDL_Surface;
23 struct SDL_Renderer;
24 
25 typedef struct { // This struct is not exposed by SDL API, but we need it.
26  float x;
27  float y;
28 } SDL_FPoint;
29 
30 namespace AlgAudio{
31 
33 class SDLFix{
34 public:
36  static void PremultiplySurface32RGBA(SDL_Surface* surf);
42  static void FixRenderer(SDL_Renderer* renderer);
48  static void CorrectBlendMode(SDL_Renderer* renderer);
50  static void RenderDrawLines(SDL_Renderer* renderer, const SDL_FPoint* points, int count);
52  static void RenderSetLineSmoothing(SDL_Renderer* renderer, bool enabled);
57  static void RendererMakeCurrent(SDL_Renderer* renderer);
59  static void RenderSetLineWidth(SDL_Renderer* renderer, float w);
60  /* Does some pointless GL calls to set a visible mark in gl api trace with
61  * the provided number. */
62  static void MarkApiTrace(SDL_Renderer* renderer, int no);
63 private:
64  SDLFix() = delete;
65 };
66 
67 } // namespace AlgAudio
68 
69 #endif // SDLFIX_HPP
static void RenderSetLineWidth(SDL_Renderer *renderer, float w)
static void RenderSetLineSmoothing(SDL_Renderer *renderer, bool enabled)
static void CorrectBlendMode(SDL_Renderer *renderer)
static void RenderDrawLines(SDL_Renderer *renderer, const SDL_FPoint *points, int count)
static void FixRenderer(SDL_Renderer *renderer)
static void MarkApiTrace(SDL_Renderer *renderer, int no)
Definition: Alertable.hpp:26
static void RendererMakeCurrent(SDL_Renderer *renderer)
static void PremultiplySurface32RGBA(SDL_Surface *surf)
Definition: SDLFix.hpp:33
float x
Definition: SDLFix.hpp:26
Definition: SDLFix.hpp:25
float y
Definition: SDLFix.hpp:27