|
@@ -251,9 +251,12 @@ extern DECLSPEC SDL_Renderer * SDLCALL SDL_CreateRenderer(SDL_Window *window, co
|
|
|
* These are the supported properties:
|
|
|
*
|
|
|
* - "window" (pointer) - the window where rendering is displayed
|
|
|
- * - "surface" (pointer) - the surface where rendering is displayed, if you want a software renderer without a window
|
|
|
- * - "name" (string) - the name of the rendering driver to use, if a specific one is desired
|
|
|
- * - "present_vsync" (boolean) - true if you want present synchronized with the refresh rate
|
|
|
+ * - "surface" (pointer) - the surface where rendering is displayed, if you
|
|
|
+ * want a software renderer without a window
|
|
|
+ * - "name" (string) - the name of the rendering driver to use, if a specific
|
|
|
+ * one is desired
|
|
|
+ * - "present_vsync" (boolean) - true if you want present synchronized with
|
|
|
+ * the refresh rate
|
|
|
*
|
|
|
* \param props the properties to use
|
|
|
* \returns a valid rendering context or NULL if there was an error; call
|
|
@@ -447,36 +450,52 @@ extern DECLSPEC SDL_Texture *SDLCALL SDL_CreateTextureFromSurface(SDL_Renderer *
|
|
|
*
|
|
|
* These are the supported properties:
|
|
|
*
|
|
|
- * - "format" (number) - one of the enumerated values in SDL_PixelFormatEnum, defaults to the best RGBA format for the renderer
|
|
|
- * - "access" (number) - one of the enumerated values in SDL_TextureAccess, defaults to SDL_TEXTUREACCESS_STATIC
|
|
|
+ * - "format" (number) - one of the enumerated values in SDL_PixelFormatEnum,
|
|
|
+ * defaults to the best RGBA format for the renderer
|
|
|
+ * - "access" (number) - one of the enumerated values in SDL_TextureAccess,
|
|
|
+ * defaults to SDL_TEXTUREACCESS_STATIC
|
|
|
* - "width" (number) - the width of the texture in pixels, required
|
|
|
* - "height" (number) - the height of the texture in pixels, required
|
|
|
*
|
|
|
* With the direct3d11 renderer:
|
|
|
*
|
|
|
- * - "d3d11.texture" (pointer) - the ID3D11Texture2D associated with the texture, if you want to wrap an existing texture.
|
|
|
- * - "d3d11.texture_u" (pointer) - the ID3D11Texture2D associated with the U plane of a YUV texture, if you want to wrap an existing texture.
|
|
|
- * - "d3d11.texture_v" (pointer) - the ID3D11Texture2D associated with the V plane of a YUV texture, if you want to wrap an existing texture.
|
|
|
+ * - "d3d11.texture" (pointer) - the ID3D11Texture2D associated with the
|
|
|
+ * texture, if you want to wrap an existing texture.
|
|
|
+ * - "d3d11.texture_u" (pointer) - the ID3D11Texture2D associated with the U
|
|
|
+ * plane of a YUV texture, if you want to wrap an existing texture.
|
|
|
+ * - "d3d11.texture_v" (pointer) - the ID3D11Texture2D associated with the V
|
|
|
+ * plane of a YUV texture, if you want to wrap an existing texture.
|
|
|
*
|
|
|
* With the direct3d12 renderer:
|
|
|
*
|
|
|
- * - "d3d12.texture" (pointer) - the ID3D12Resource associated with the texture, if you want to wrap an existing texture.
|
|
|
- * - "d3d12.texture_u" (pointer) - the ID3D12Resource associated with the U plane of a YUV texture, if you want to wrap an existing texture.
|
|
|
- * - "d3d12.texture_v" (pointer) - the ID3D12Resource associated with the V plane of a YUV texture, if you want to wrap an existing texture.
|
|
|
+ * - "d3d12.texture" (pointer) - the ID3D12Resource associated with the
|
|
|
+ * texture, if you want to wrap an existing texture.
|
|
|
+ * - "d3d12.texture_u" (pointer) - the ID3D12Resource associated with the U
|
|
|
+ * plane of a YUV texture, if you want to wrap an existing texture.
|
|
|
+ * - "d3d12.texture_v" (pointer) - the ID3D12Resource associated with the V
|
|
|
+ * plane of a YUV texture, if you want to wrap an existing texture.
|
|
|
*
|
|
|
* With the opengl renderer:
|
|
|
*
|
|
|
- * - "opengl.texture" (number) - the GLuint texture associated with the texture, if you want to wrap an existing texture.
|
|
|
- * - "opengl.texture_uv" (number) - the GLuint texture associated with the UV plane of an NV12 texture, if you want to wrap an existing texture.
|
|
|
- * - "opengl.texture_u" (number) - the GLuint texture associated with the U plane of a YUV texture, if you want to wrap an existing texture.
|
|
|
- * - "opengl.texture_v" (number) - the GLuint texture associated with the V plane of a YUV texture, if you want to wrap an existing texture.
|
|
|
+ * - "opengl.texture" (number) - the GLuint texture associated with the
|
|
|
+ * texture, if you want to wrap an existing texture.
|
|
|
+ * - "opengl.texture_uv" (number) - the GLuint texture associated with the UV
|
|
|
+ * plane of an NV12 texture, if you want to wrap an existing texture.
|
|
|
+ * - "opengl.texture_u" (number) - the GLuint texture associated with the U
|
|
|
+ * plane of a YUV texture, if you want to wrap an existing texture.
|
|
|
+ * - "opengl.texture_v" (number) - the GLuint texture associated with the V
|
|
|
+ * plane of a YUV texture, if you want to wrap an existing texture.
|
|
|
*
|
|
|
* With the opengles2 renderer:
|
|
|
*
|
|
|
- * - "opengles2.texture" (number) - the GLuint texture associated with the texture, if you want to wrap an existing texture.
|
|
|
- * - "opengles2.texture_uv" (number) - the GLuint texture associated with the UV plane of an NV12 texture, if you want to wrap an existing texture.
|
|
|
- * - "opengles2.texture_u" (number) - the GLuint texture associated with the U plane of a YUV texture, if you want to wrap an existing texture.
|
|
|
- * - "opengles2.texture_v" (number) - the GLuint texture associated with the V plane of a YUV texture, if you want to wrap an existing texture.
|
|
|
+ * - "opengles2.texture" (number) - the GLuint texture associated with the
|
|
|
+ * texture, if you want to wrap an existing texture.
|
|
|
+ * - "opengles2.texture_uv" (number) - the GLuint texture associated with the
|
|
|
+ * UV plane of an NV12 texture, if you want to wrap an existing texture.
|
|
|
+ * - "opengles2.texture_u" (number) - the GLuint texture associated with the U
|
|
|
+ * plane of a YUV texture, if you want to wrap an existing texture.
|
|
|
+ * - "opengles2.texture_v" (number) - the GLuint texture associated with the V
|
|
|
+ * plane of a YUV texture, if you want to wrap an existing texture.
|
|
|
*
|
|
|
* \param renderer the rendering context
|
|
|
* \param props the properties to use
|
|
@@ -501,31 +520,47 @@ extern DECLSPEC SDL_Texture *SDLCALL SDL_CreateTextureWithProperties(SDL_Rendere
|
|
|
*
|
|
|
* With the direct3d11 renderer:
|
|
|
*
|
|
|
- * - "SDL.texture.d3d11.texture" (pointer) - the ID3D11Texture2D associated with the texture
|
|
|
- * - "SDL.texture.d3d11.texture_u" (pointer) - the ID3D11Texture2D associated with the U plane of a YUV texture
|
|
|
- * - "SDL.texture.d3d11.texture_v" (pointer) - the ID3D11Texture2D associated with the V plane of a YUV texture
|
|
|
+ * - "SDL.texture.d3d11.texture" (pointer) - the ID3D11Texture2D associated
|
|
|
+ * with the texture
|
|
|
+ * - "SDL.texture.d3d11.texture_u" (pointer) - the ID3D11Texture2D associated
|
|
|
+ * with the U plane of a YUV texture
|
|
|
+ * - "SDL.texture.d3d11.texture_v" (pointer) - the ID3D11Texture2D associated
|
|
|
+ * with the V plane of a YUV texture
|
|
|
*
|
|
|
* With the direct3d12 renderer:
|
|
|
*
|
|
|
- * - "SDL.texture.d3d12.texture" (pointer) - the ID3D12Resource associated with the texture
|
|
|
- * - "SDL.texture.d3d12.texture_u" (pointer) - the ID3D12Resource associated with the U plane of a YUV texture
|
|
|
- * - "SDL.texture.d3d12.texture_v" (pointer) - the ID3D12Resource associated with the V plane of a YUV texture
|
|
|
+ * - "SDL.texture.d3d12.texture" (pointer) - the ID3D12Resource associated
|
|
|
+ * with the texture
|
|
|
+ * - "SDL.texture.d3d12.texture_u" (pointer) - the ID3D12Resource associated
|
|
|
+ * with the U plane of a YUV texture
|
|
|
+ * - "SDL.texture.d3d12.texture_v" (pointer) - the ID3D12Resource associated
|
|
|
+ * with the V plane of a YUV texture
|
|
|
*
|
|
|
* With the opengl renderer:
|
|
|
*
|
|
|
- * - "SDL.texture.opengl.texture" (number) - the GLuint texture associated with the texture
|
|
|
- * - "SDL.texture.opengl.texture_uv" (number) - the GLuint texture associated with the UV plane of an NV12 texture
|
|
|
- * - "SDL.texture.opengl.texture_u" (number) - the GLuint texture associated with the U plane of a YUV texture
|
|
|
- * - "SDL.texture.opengl.texture_v" (number) - the GLuint texture associated with the V plane of a YUV texture
|
|
|
- * - "SDL.texture.opengl.tex_w" (float) - the texture coordinate width of the texture (0.0 - 1.0)
|
|
|
- * - "SDL.texture.opengl.tex_h" (float) - the texture coordinate height of the texture (0.0 - 1.0)
|
|
|
+ * - "SDL.texture.opengl.texture" (number) - the GLuint texture associated
|
|
|
+ * with the texture
|
|
|
+ * - "SDL.texture.opengl.texture_uv" (number) - the GLuint texture associated
|
|
|
+ * with the UV plane of an NV12 texture
|
|
|
+ * - "SDL.texture.opengl.texture_u" (number) - the GLuint texture associated
|
|
|
+ * with the U plane of a YUV texture
|
|
|
+ * - "SDL.texture.opengl.texture_v" (number) - the GLuint texture associated
|
|
|
+ * with the V plane of a YUV texture
|
|
|
+ * - "SDL.texture.opengl.tex_w" (float) - the texture coordinate width of the
|
|
|
+ * texture (0.0 - 1.0)
|
|
|
+ * - "SDL.texture.opengl.tex_h" (float) - the texture coordinate height of the
|
|
|
+ * texture (0.0 - 1.0)
|
|
|
*
|
|
|
* With the opengles2 renderer:
|
|
|
*
|
|
|
- * - "SDL.texture.opengles2.texture" (number) - the GLuint texture associated with the texture
|
|
|
- * - "SDL.texture.opengles2.texture_uv" (number) - the GLuint texture associated with the UV plane of an NV12 texture
|
|
|
- * - "SDL.texture.opengles2.texture_u" (number) - the GLuint texture associated with the U plane of a YUV texture
|
|
|
- * - "SDL.texture.opengles2.texture_v" (number) - the GLuint texture associated with the V plane of a YUV texture
|
|
|
+ * - "SDL.texture.opengles2.texture" (number) - the GLuint texture associated
|
|
|
+ * with the texture
|
|
|
+ * - "SDL.texture.opengles2.texture_uv" (number) - the GLuint texture
|
|
|
+ * associated with the UV plane of an NV12 texture
|
|
|
+ * - "SDL.texture.opengles2.texture_u" (number) - the GLuint texture
|
|
|
+ * associated with the U plane of a YUV texture
|
|
|
+ * - "SDL.texture.opengles2.texture_v" (number) - the GLuint texture
|
|
|
+ * associated with the V plane of a YUV texture
|
|
|
*
|
|
|
* \param texture the texture to query
|
|
|
* \returns a valid property ID on success or 0 on failure; call
|
|
@@ -1565,15 +1600,14 @@ extern DECLSPEC void SDLCALL SDL_DestroyRenderer(SDL_Renderer *renderer);
|
|
|
*
|
|
|
* In all other cases, you can ignore this function.
|
|
|
*
|
|
|
- * This call makes SDL flush any pending rendering work it was queueing up
|
|
|
- * to do later in a single batch, and marks any internal cached state as
|
|
|
- * invalid, so it'll prepare all its state again later, from scratch.
|
|
|
+ * This call makes SDL flush any pending rendering work it was queueing up to
|
|
|
+ * do later in a single batch, and marks any internal cached state as invalid,
|
|
|
+ * so it'll prepare all its state again later, from scratch.
|
|
|
*
|
|
|
* This means you do not need to save state in your rendering code to protect
|
|
|
- * the SDL renderer. However, there lots of arbitrary pieces of Direct3D
|
|
|
- * and OpenGL state that can confuse things; you should use your best
|
|
|
- * judgement and be prepared to make changes if specific state needs to be
|
|
|
- * protected.
|
|
|
+ * the SDL renderer. However, there lots of arbitrary pieces of Direct3D and
|
|
|
+ * OpenGL state that can confuse things; you should use your best judgement
|
|
|
+ * and be prepared to make changes if specific state needs to be protected.
|
|
|
*
|
|
|
* \param renderer the rendering context
|
|
|
* \returns 0 on success or a negative error code on failure; call
|