SDL_CreateRenderer
Use this function to create a 2D rendering context for a window.
Syntax
SDL_Renderer* SDL_CreateRenderer(SDL_Window* window,
int index,
Uint32 flags)
Function Parameters
window |
the window where rendering is displayed |
index |
the index of the rendering driver to initialize, or -1 to initialize the first one supporting the requested flags |
flags |
0, or one or more SDL_RendererFlags OR'd together; see Remarks for details |
Return Value
Returns a valid rendering context or NULL if there was an error; call SDL_GetError() for more information.
Code Examples
You can add your code example here
Remarks
flags may be any of the following OR'd together:
SDL_RENDERER_ACCELERATED |
the renderer uses hardware acceleration |
SDL_RENDERER_PRESENTVSYNC |
present is synchronized with the refresh rate |