Wiki Page Content

Differences between revisions 18 and 19
Revision 18 as of 2009-12-13 02:06:25
Size: 1265
Editor: SheenaSmith
Comment: added RFs
Revision 19 as of 2010-01-21 18:32:18
Size: 1258
Editor: SheenaSmith
Comment: Update WindowID > Window*
Deletions are marked like this. Additions are marked like this.
Line 11: Line 11:
int SDL_CreateRenderer(SDL_WindowID windowID,
                       int   index,
                       Uint32  flags)
int SDL_CreateRenderer(SDL_Window* window,
                       int index,
                       Uint32 flags)
Line 17: Line 17:
||'''windowID'''||the window where rendering is displayed|| ||'''window'''||the window where rendering is displayed||

SDL_CreateRenderer

Use this function to create and make active a 2D rendering context for a window.

Syntax

int 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

0 on success, -1 if there was an error creating the renderer; call SDL_GetError() for more information.

Code Examples

You can add your code example here

Remarks

flags can have any number of these values OR'd in:

SDL_RENDERER_SOFTWARE

the renderer is a software fallback

SDL_RENDERER_ACCELERATED

the renderer uses hardware acceleration

SDL_RENDERER_PRESENTVSYNC

present is synchronized with the refresh rate

SDL_RENDERER_TARGETTEXTURE

the renderer supports rendering to texture

Note that providing no flags gives priority to available SDL_RENDERER_ACCELERATED renderers.


CategoryAPI, CategoryVideo

None: SDL_CreateRenderer (last edited 2014-11-11 02:06:24 by RyanGordon)

(Page Info.)
Feedback
Please include your contact information if you'd like to receive a reply.
Submit