diff options
author | Sam Lantinga <slouken@libsdl.org> | 2012-01-22 19:22:53 -0500 |
---|---|---|
committer | Sam Lantinga <slouken@libsdl.org> | 2012-01-22 19:22:53 -0500 |
commit | 14703f45a7f407ffae16a2e9ebdbb22789f88be9 (patch) | |
tree | fde493c96d456210b0ad458975979c15cb15a6c4 /include/SDL_render.h | |
parent | f0ce5d9f9eee4d8592d5e218c633cceabffa74d8 (diff) | |
download | sdl-14703f45a7f407ffae16a2e9ebdbb22789f88be9.tar.gz |
Added a convenience function SDL_CreateWindowAndRenderer()
Diffstat (limited to 'include/SDL_render.h')
-rw-r--r-- | include/SDL_render.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/SDL_render.h b/include/SDL_render.h index 7f0c815fa..dbbf83624 100644 --- a/include/SDL_render.h +++ b/include/SDL_render.h @@ -148,6 +148,22 @@ extern DECLSPEC int SDLCALL SDL_GetRenderDriverInfo(int index, SDL_RendererInfo * info); /** + * \brief Create a window and default renderer + * + * \param width The width of the window + * \param height The height of the window + * \param window_flags The flags used to create the window + * \param window A pointer filled with the window, or NULL on error + * \param renderer A pointer filled with the renderer, or NULL on error + * + * \return 0 on success, or -1 on error + */ +extern DECLSPEC int SDLCALL SDL_CreateWindowAndRenderer( + int width, int height, Uint32 window_flags, + SDL_Window **window, SDL_Renderer **renderer); + + +/** * \brief Create a 2D rendering context for a window. * * \param window The window where rendering is displayed. |