Classes | |
struct | GPU_Context |
Typedefs | |
typedef struct GPU_Context | GPU_Context |
DECLSPEC GPU_Target *SDLCALL | GPU_GetContextTarget (void) |
DECLSPEC GPU_Target *SDLCALL | GPU_GetWindowTarget (Uint32 windowID) |
DECLSPEC GPU_Target *SDLCALL | GPU_CreateTargetFromWindow (Uint32 windowID) |
DECLSPEC void SDLCALL | GPU_MakeCurrent (GPU_Target *target, Uint32 windowID) |
DECLSPEC GPU_bool SDLCALL | GPU_SetWindowResolution (Uint16 w, Uint16 h) |
DECLSPEC GPU_bool SDLCALL | GPU_SetFullscreen (GPU_bool enable_fullscreen, GPU_bool use_desktop_resolution) |
DECLSPEC GPU_bool SDLCALL | GPU_GetFullscreen (void) |
DECLSPEC void SDLCALL | GPU_SetShapeBlending (GPU_bool enable) |
DECLSPEC GPU_BlendMode SDLCALL | GPU_GetBlendModeFromPreset (GPU_BlendPresetEnum preset) |
DECLSPEC void SDLCALL | GPU_SetShapeBlendFunction (GPU_BlendFuncEnum source_color, GPU_BlendFuncEnum dest_color, GPU_BlendFuncEnum source_alpha, GPU_BlendFuncEnum dest_alpha) |
DECLSPEC void SDLCALL | GPU_SetShapeBlendEquation (GPU_BlendEqEnum color_equation, GPU_BlendEqEnum alpha_equation) |
DECLSPEC void SDLCALL | GPU_SetShapeBlendMode (GPU_BlendPresetEnum mode) |
DECLSPEC float SDLCALL | GPU_SetLineThickness (float thickness) |
DECLSPEC float SDLCALL | GPU_GetLineThickness (void) |
typedef struct GPU_Context GPU_Context |
Rendering context data. Only GPU_Targets which represent windows will store this.
DECLSPEC GPU_Target* SDLCALL GPU_CreateTargetFromWindow | ( | Uint32 | windowID | ) |
Creates a separate context for the given window using the current renderer and returns a GPU_Target that represents it.
DECLSPEC GPU_BlendMode SDLCALL GPU_GetBlendModeFromPreset | ( | GPU_BlendPresetEnum | preset | ) |
Translates a blend preset into a blend mode.
DECLSPEC GPU_Target* SDLCALL GPU_GetContextTarget | ( | void | ) |
DECLSPEC GPU_bool SDLCALL GPU_GetFullscreen | ( | void | ) |
Returns true if the current context target's window is in fullscreen mode.
DECLSPEC float SDLCALL GPU_GetLineThickness | ( | void | ) |
Returns the current line thickness value.
DECLSPEC GPU_Target* SDLCALL GPU_GetWindowTarget | ( | Uint32 | windowID | ) |
DECLSPEC void SDLCALL GPU_MakeCurrent | ( | GPU_Target * | target, |
Uint32 | windowID | ||
) |
Makes the given window the current rendering destination for the given context target. This also makes the target the current context for image loading and window operations. If the target does not represent a window, this does nothing.
DECLSPEC GPU_bool SDLCALL GPU_SetFullscreen | ( | GPU_bool | enable_fullscreen, |
GPU_bool | use_desktop_resolution | ||
) |
Enable/disable fullscreen mode for the current context target's window. On some platforms, this may destroy the renderer context and require that textures be reloaded. Unfortunately, SDL does not provide a notification mechanism for this.
enable_fullscreen | If true, make the application go fullscreen. If false, make the application go to windowed mode. |
use_desktop_resolution | If true, lets the window change its resolution when it enters fullscreen mode (via SDL_WINDOW_FULLSCREEN_DESKTOP). |
DECLSPEC float SDLCALL GPU_SetLineThickness | ( | float | thickness | ) |
Sets the thickness of lines for the current context.
thickness | New line thickness in pixels measured across the line. Default is 1.0f. |
DECLSPEC void SDLCALL GPU_SetShapeBlendEquation | ( | GPU_BlendEqEnum | color_equation, |
GPU_BlendEqEnum | alpha_equation | ||
) |
Sets the blending component equations for shape rendering.
DECLSPEC void SDLCALL GPU_SetShapeBlendFunction | ( | GPU_BlendFuncEnum | source_color, |
GPU_BlendFuncEnum | dest_color, | ||
GPU_BlendFuncEnum | source_alpha, | ||
GPU_BlendFuncEnum | dest_alpha | ||
) |
Sets the blending component functions for shape rendering.
DECLSPEC void SDLCALL GPU_SetShapeBlending | ( | GPU_bool | enable | ) |
Enables/disables alpha blending for shape rendering on the current window.
DECLSPEC void SDLCALL GPU_SetShapeBlendMode | ( | GPU_BlendPresetEnum | mode | ) |
Sets the blending mode for shape rendering on the current window, if supported by the renderer.
DECLSPEC GPU_bool SDLCALL GPU_SetWindowResolution | ( | Uint16 | w, |
Uint16 | h | ||
) |
Change the actual size of the current context target's window. This resets the virtual resolution and viewport of the context target. Aside from direct resolution changes, this should also be called in response to SDL_WINDOWEVENT_RESIZED window events for resizable windows.