summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSam Lantinga <slouken@libsdl.org>2012-01-22 19:22:53 -0500
committerSam Lantinga <slouken@libsdl.org>2012-01-22 19:22:53 -0500
commitec5e44cc53e033c9965507c5feaee60084916d26 (patch)
treea8352be6359343adae3be7feb9270a9aefc31064 /include
parent8f925a68c23654f8e287fee1c9d8be89e321b361 (diff)
Added a convenience function SDL_CreateWindowAndRenderer()
Diffstat (limited to 'include')
-rw-r--r--include/SDL_render.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/SDL_render.h b/include/SDL_render.h
index 7f0c815f..dbbf8362 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.