libAlgAudio
v1.99-440-g08538e5-dirty
The development library for AlgAudio framework.
|
#include <SDLFix.hpp>
Static Public Member Functions | |
static void | CorrectBlendMode (SDL_Renderer *renderer) |
static void | FixRenderer (SDL_Renderer *renderer) |
static void | MarkApiTrace (SDL_Renderer *renderer, int no) |
static void | PremultiplySurface32RGBA (SDL_Surface *surf) |
static void | RenderDrawLines (SDL_Renderer *renderer, const SDL_FPoint *points, int count) |
static void | RendererMakeCurrent (SDL_Renderer *renderer) |
static void | RenderSetLineSmoothing (SDL_Renderer *renderer, bool enabled) |
static void | RenderSetLineWidth (SDL_Renderer *renderer, float w) |
This class provides sevaral fixes and workarounds for flaws within SDL.
|
static |
This function corrects the renderers internal blendmode state. The internal formulas SDL uses are wrong, incorrect, ugly, and do not support premultiplied alpha. Call this function on your renderer after calling SetBlendMode(BLENDMODE_BLEND), and make sure your textures use an invalid blendmode, otherwise SDL will reset
|
static |
This function substitutes several method pointers inside the renderer, so that fixed (or modified) versions of several rendering functions are used whenever SDL calls any of these methods on the renderer. It also checks whether the renderer is opengl. Generally, call this function on any fresh created renderer.
|
static |
|
static |
Mutliplies all pixel colors in a surface by alpha.
|
static |
Similar to SDL_RenderDrawLines, but acccepts SDL_FPoints instead of SDL_Points.
|
static |
Some SDL calls forget to make renderer's contex current, for example internal SDL_RenderSetCLipRect suffers from this problem. This function is a helpful workaround, it forces SDL to call GL_ActivateRenderer(renderer) and nothing else.
|
static |
Calls glEnable( GL_LINE_SMOOTH ).
|
static |
Sets GL line width.