Sync SDL2 wiki -> header
This commit is contained in:
parent
169f77ed5e
commit
143d5d779c
41 changed files with 1150 additions and 1138 deletions
|
@ -172,9 +172,9 @@ extern DECLSPEC int SDLCALL SDL_GetNumRenderDrivers(void);
|
|||
/**
|
||||
* Get info about a specific 2D rendering driver for the current display.
|
||||
*
|
||||
* \param index the index of the driver to query information about
|
||||
* \param index the index of the driver to query information about.
|
||||
* \param info an SDL_RendererInfo structure to be filled with information on
|
||||
* the rendering driver
|
||||
* the rendering driver.
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
|
@ -189,12 +189,12 @@ extern DECLSPEC int SDLCALL SDL_GetRenderDriverInfo(int index,
|
|||
/**
|
||||
* Create a window and default renderer.
|
||||
*
|
||||
* \param width the width of the window
|
||||
* \param height the height of the window
|
||||
* \param width the width of the window.
|
||||
* \param height the height of the window.
|
||||
* \param window_flags the flags used to create the window (see
|
||||
* SDL_CreateWindow())
|
||||
* \param window a pointer filled with the window, or NULL on error
|
||||
* \param renderer a pointer filled with the renderer, or NULL on error
|
||||
* SDL_CreateWindow()).
|
||||
* \param window a pointer filled with the window, or NULL on error.
|
||||
* \param renderer a pointer filled with the renderer, or NULL on error.
|
||||
* \returns 0 on success, or -1 on error; call SDL_GetError() for more
|
||||
* information.
|
||||
*
|
||||
|
@ -211,10 +211,10 @@ extern DECLSPEC int SDLCALL SDL_CreateWindowAndRenderer(
|
|||
/**
|
||||
* Create a 2D rendering context for a window.
|
||||
*
|
||||
* \param window the window where rendering is displayed
|
||||
* \param window the window where rendering is displayed.
|
||||
* \param index the index of the rendering driver to initialize, or -1 to
|
||||
* initialize the first one supporting the requested flags
|
||||
* \param flags 0, or one or more SDL_RendererFlags OR'd together
|
||||
* initialize the first one supporting the requested flags.
|
||||
* \param flags 0, or one or more SDL_RendererFlags OR'd together.
|
||||
* \returns a valid rendering context or NULL if there was an error; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
|
@ -237,7 +237,7 @@ extern DECLSPEC SDL_Renderer * SDLCALL SDL_CreateRenderer(SDL_Window * window,
|
|||
* SDL_Window as the final destination and not an SDL_Surface.
|
||||
*
|
||||
* \param surface the SDL_Surface structure representing the surface where
|
||||
* rendering is done
|
||||
* rendering is done.
|
||||
* \returns a valid rendering context or NULL if there was an error; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
|
@ -252,7 +252,7 @@ extern DECLSPEC SDL_Renderer * SDLCALL SDL_CreateSoftwareRenderer(SDL_Surface *
|
|||
/**
|
||||
* Get the renderer associated with a window.
|
||||
*
|
||||
* \param window the window to query
|
||||
* \param window the window to query.
|
||||
* \returns the rendering context on success or NULL on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
|
@ -265,7 +265,7 @@ extern DECLSPEC SDL_Renderer * SDLCALL SDL_GetRenderer(SDL_Window * window);
|
|||
/**
|
||||
* Get the window associated with a renderer.
|
||||
*
|
||||
* \param renderer the renderer to query
|
||||
* \param renderer the renderer to query.
|
||||
* \returns the window on success or NULL on failure; call SDL_GetError() for
|
||||
* more information.
|
||||
*
|
||||
|
@ -276,9 +276,9 @@ extern DECLSPEC SDL_Window * SDLCALL SDL_RenderGetWindow(SDL_Renderer *renderer)
|
|||
/**
|
||||
* Get information about a rendering context.
|
||||
*
|
||||
* \param renderer the rendering context
|
||||
* \param renderer the rendering context.
|
||||
* \param info an SDL_RendererInfo structure filled with information about the
|
||||
* current renderer
|
||||
* current renderer.
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
|
@ -296,9 +296,9 @@ extern DECLSPEC int SDLCALL SDL_GetRendererInfo(SDL_Renderer * renderer,
|
|||
* has more pixels than the window that contains it, so use this instead of
|
||||
* SDL_GetWindowSize() to decide how much drawing area you have.
|
||||
*
|
||||
* \param renderer the rendering context
|
||||
* \param w an int filled with the width
|
||||
* \param h an int filled with the height
|
||||
* \param renderer the rendering context.
|
||||
* \param w an int filled with the width.
|
||||
* \param h an int filled with the height.
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
|
@ -315,11 +315,11 @@ extern DECLSPEC int SDLCALL SDL_GetRendererOutputSize(SDL_Renderer * renderer,
|
|||
* You can set the texture scaling method by setting
|
||||
* `SDL_HINT_RENDER_SCALE_QUALITY` before creating the texture.
|
||||
*
|
||||
* \param renderer the rendering context
|
||||
* \param format one of the enumerated values in SDL_PixelFormatEnum
|
||||
* \param access one of the enumerated values in SDL_TextureAccess
|
||||
* \param w the width of the texture in pixels
|
||||
* \param h the height of the texture in pixels
|
||||
* \param renderer the rendering context.
|
||||
* \param format one of the enumerated values in SDL_PixelFormatEnum.
|
||||
* \param access one of the enumerated values in SDL_TextureAccess.
|
||||
* \param w the width of the texture in pixels.
|
||||
* \param h the height of the texture in pixels.
|
||||
* \returns a pointer to the created texture or NULL if no rendering context
|
||||
* was active, the format was unsupported, or the width or height
|
||||
* were out of range; call SDL_GetError() for more information.
|
||||
|
@ -348,9 +348,9 @@ extern DECLSPEC SDL_Texture * SDLCALL SDL_CreateTexture(SDL_Renderer * renderer,
|
|||
* format of the surface. Use SDL_QueryTexture() to query the pixel format of
|
||||
* the texture.
|
||||
*
|
||||
* \param renderer the rendering context
|
||||
* \param renderer the rendering context.
|
||||
* \param surface the SDL_Surface structure containing pixel data used to fill
|
||||
* the texture
|
||||
* the texture.
|
||||
* \returns the created texture or NULL on failure; call SDL_GetError() for
|
||||
* more information.
|
||||
*
|
||||
|
@ -365,7 +365,7 @@ extern DECLSPEC SDL_Texture * SDLCALL SDL_CreateTextureFromSurface(SDL_Renderer
|
|||
/**
|
||||
* Query the attributes of a texture.
|
||||
*
|
||||
* \param texture the texture to query
|
||||
* \param texture the texture to query.
|
||||
* \param format a pointer filled in with the raw format of the texture; the
|
||||
* actual format may differ, but pixel transfers will use this
|
||||
* format (one of the SDL_PixelFormatEnum values). This argument
|
||||
|
@ -400,10 +400,10 @@ extern DECLSPEC int SDLCALL SDL_QueryTexture(SDL_Texture * texture,
|
|||
* Color modulation is not always supported by the renderer; it will return -1
|
||||
* if color modulation is not supported.
|
||||
*
|
||||
* \param texture the texture to update
|
||||
* \param r the red color value multiplied into copy operations
|
||||
* \param g the green color value multiplied into copy operations
|
||||
* \param b the blue color value multiplied into copy operations
|
||||
* \param texture the texture to update.
|
||||
* \param r the red color value multiplied into copy operations.
|
||||
* \param g the green color value multiplied into copy operations.
|
||||
* \param b the blue color value multiplied into copy operations.
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
|
@ -419,10 +419,10 @@ extern DECLSPEC int SDLCALL SDL_SetTextureColorMod(SDL_Texture * texture,
|
|||
/**
|
||||
* Get the additional color value multiplied into render copy operations.
|
||||
*
|
||||
* \param texture the texture to query
|
||||
* \param r a pointer filled in with the current red color value
|
||||
* \param g a pointer filled in with the current green color value
|
||||
* \param b a pointer filled in with the current blue color value
|
||||
* \param texture the texture to query.
|
||||
* \param r a pointer filled in with the current red color value.
|
||||
* \param g a pointer filled in with the current green color value.
|
||||
* \param b a pointer filled in with the current blue color value.
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
|
@ -446,8 +446,8 @@ extern DECLSPEC int SDLCALL SDL_GetTextureColorMod(SDL_Texture * texture,
|
|||
* Alpha modulation is not always supported by the renderer; it will return -1
|
||||
* if alpha modulation is not supported.
|
||||
*
|
||||
* \param texture the texture to update
|
||||
* \param alpha the source alpha value multiplied into copy operations
|
||||
* \param texture the texture to update.
|
||||
* \param alpha the source alpha value multiplied into copy operations.
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
|
@ -462,8 +462,8 @@ extern DECLSPEC int SDLCALL SDL_SetTextureAlphaMod(SDL_Texture * texture,
|
|||
/**
|
||||
* Get the additional alpha value multiplied into render copy operations.
|
||||
*
|
||||
* \param texture the texture to query
|
||||
* \param alpha a pointer filled in with the current alpha value
|
||||
* \param texture the texture to query.
|
||||
* \param alpha a pointer filled in with the current alpha value.
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
|
@ -481,8 +481,8 @@ extern DECLSPEC int SDLCALL SDL_GetTextureAlphaMod(SDL_Texture * texture,
|
|||
* If the blend mode is not supported, the closest supported mode is chosen
|
||||
* and this function returns -1.
|
||||
*
|
||||
* \param texture the texture to update
|
||||
* \param blendMode the SDL_BlendMode to use for texture blending
|
||||
* \param texture the texture to update.
|
||||
* \param blendMode the SDL_BlendMode to use for texture blending.
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
|
@ -497,8 +497,8 @@ extern DECLSPEC int SDLCALL SDL_SetTextureBlendMode(SDL_Texture * texture,
|
|||
/**
|
||||
* Get the blend mode used for texture copy operations.
|
||||
*
|
||||
* \param texture the texture to query
|
||||
* \param blendMode a pointer filled in with the current SDL_BlendMode
|
||||
* \param texture the texture to query.
|
||||
* \param blendMode a pointer filled in with the current SDL_BlendMode.
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
|
@ -580,12 +580,12 @@ extern DECLSPEC void * SDLCALL SDL_GetTextureUserData(SDL_Texture * texture);
|
|||
* While this function will work with streaming textures, for optimization
|
||||
* reasons you may not get the pixels back if you lock the texture afterward.
|
||||
*
|
||||
* \param texture the texture to update
|
||||
* \param texture the texture to update.
|
||||
* \param rect an SDL_Rect structure representing the area to update, or NULL
|
||||
* to update the entire texture
|
||||
* \param pixels the raw pixel data in the format of the texture
|
||||
* to update the entire texture.
|
||||
* \param pixels the raw pixel data in the format of the texture.
|
||||
* \param pitch the number of bytes in a row of pixel data, including padding
|
||||
* between lines
|
||||
* between lines.
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
|
@ -607,18 +607,18 @@ extern DECLSPEC int SDLCALL SDL_UpdateTexture(SDL_Texture * texture,
|
|||
* block of Y and U/V planes in the proper order, but this function is
|
||||
* available if your pixel data is not contiguous.
|
||||
*
|
||||
* \param texture the texture to update
|
||||
* \param texture the texture to update.
|
||||
* \param rect a pointer to the rectangle of pixels to update, or NULL to
|
||||
* update the entire texture
|
||||
* \param Yplane the raw pixel data for the Y plane
|
||||
* update the entire texture.
|
||||
* \param Yplane the raw pixel data for the Y plane.
|
||||
* \param Ypitch the number of bytes between rows of pixel data for the Y
|
||||
* plane
|
||||
* \param Uplane the raw pixel data for the U plane
|
||||
* plane.
|
||||
* \param Uplane the raw pixel data for the U plane.
|
||||
* \param Upitch the number of bytes between rows of pixel data for the U
|
||||
* plane
|
||||
* \param Vplane the raw pixel data for the V plane
|
||||
* plane.
|
||||
* \param Vplane the raw pixel data for the V plane.
|
||||
* \param Vpitch the number of bytes between rows of pixel data for the V
|
||||
* plane
|
||||
* plane.
|
||||
* \returns 0 on success or -1 if the texture is not valid; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
|
@ -639,7 +639,7 @@ extern DECLSPEC int SDLCALL SDL_UpdateYUVTexture(SDL_Texture * texture,
|
|||
* block of NV12/21 planes in the proper order, but this function is available
|
||||
* if your pixel data is not contiguous.
|
||||
*
|
||||
* \param texture the texture to update
|
||||
* \param texture the texture to update.
|
||||
* \param rect a pointer to the rectangle of pixels to update, or NULL to
|
||||
* update the entire texture.
|
||||
* \param Yplane the raw pixel data for the Y plane.
|
||||
|
@ -669,13 +669,13 @@ extern DECLSPEC int SDLCALL SDL_UpdateNVTexture(SDL_Texture * texture,
|
|||
* changes.
|
||||
*
|
||||
* \param texture the texture to lock for access, which was created with
|
||||
* `SDL_TEXTUREACCESS_STREAMING`
|
||||
* `SDL_TEXTUREACCESS_STREAMING`.
|
||||
* \param rect an SDL_Rect structure representing the area to lock for access;
|
||||
* NULL to lock the entire texture
|
||||
* NULL to lock the entire texture.
|
||||
* \param pixels this is filled in with a pointer to the locked pixels,
|
||||
* appropriately offset by the locked area
|
||||
* appropriately offset by the locked area.
|
||||
* \param pitch this is filled in with the pitch of the locked pixels; the
|
||||
* pitch is the length of one row in bytes
|
||||
* pitch is the length of one row in bytes.
|
||||
* \returns 0 on success or a negative error code if the texture is not valid
|
||||
* or was not created with `SDL_TEXTUREACCESS_STREAMING`; call
|
||||
* SDL_GetError() for more information.
|
||||
|
@ -707,13 +707,13 @@ extern DECLSPEC int SDLCALL SDL_LockTexture(SDL_Texture * texture,
|
|||
* or SDL_DestroyTexture(). The caller should not free it.
|
||||
*
|
||||
* \param texture the texture to lock for access, which was created with
|
||||
* `SDL_TEXTUREACCESS_STREAMING`
|
||||
* `SDL_TEXTUREACCESS_STREAMING`.
|
||||
* \param rect a pointer to the rectangle to lock for access. If the rect is
|
||||
* NULL, the entire texture will be locked
|
||||
* NULL, the entire texture will be locked.
|
||||
* \param surface this is filled in with an SDL surface representing the
|
||||
* locked area
|
||||
* locked area.
|
||||
* \returns 0 on success, or -1 if the texture is not valid or was not created
|
||||
* with `SDL_TEXTUREACCESS_STREAMING`
|
||||
* with `SDL_TEXTUREACCESS_STREAMING`.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.12.
|
||||
*
|
||||
|
@ -735,7 +735,7 @@ extern DECLSPEC int SDLCALL SDL_LockTextureToSurface(SDL_Texture *texture,
|
|||
* Which is to say: locking and immediately unlocking a texture can result in
|
||||
* corrupted textures, depending on the renderer in use.
|
||||
*
|
||||
* \param texture a texture locked by SDL_LockTexture()
|
||||
* \param texture a texture locked by SDL_LockTexture().
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
|
@ -746,7 +746,7 @@ extern DECLSPEC void SDLCALL SDL_UnlockTexture(SDL_Texture * texture);
|
|||
/**
|
||||
* Determine whether a renderer supports the use of render targets.
|
||||
*
|
||||
* \param renderer the renderer that will be checked
|
||||
* \param renderer the renderer that will be checked.
|
||||
* \returns SDL_TRUE if supported or SDL_FALSE if not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
|
@ -766,7 +766,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_RenderTargetSupported(SDL_Renderer *rendere
|
|||
* To stop rendering to a texture and render to the window again, call this
|
||||
* function with a NULL `texture`.
|
||||
*
|
||||
* \param renderer the rendering context
|
||||
* \param renderer the rendering context.
|
||||
* \param texture the targeted texture, which must be created with the
|
||||
* `SDL_TEXTUREACCESS_TARGET` flag, or NULL to render to the
|
||||
* window instead of a texture.
|
||||
|
@ -786,7 +786,7 @@ extern DECLSPEC int SDLCALL SDL_SetRenderTarget(SDL_Renderer *renderer,
|
|||
* The default render target is the window for which the renderer was created,
|
||||
* and is reported a NULL here.
|
||||
*
|
||||
* \param renderer the rendering context
|
||||
* \param renderer the rendering context.
|
||||
* \returns the current render target or NULL for the default render target.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
|
@ -811,9 +811,9 @@ extern DECLSPEC SDL_Texture * SDLCALL SDL_GetRenderTarget(SDL_Renderer *renderer
|
|||
* If this function results in scaling or subpixel drawing by the rendering
|
||||
* backend, it will be handled using the appropriate quality hints.
|
||||
*
|
||||
* \param renderer the renderer for which resolution should be set
|
||||
* \param w the width of the logical resolution
|
||||
* \param h the height of the logical resolution
|
||||
* \param renderer the renderer for which resolution should be set.
|
||||
* \param w the width of the logical resolution.
|
||||
* \param h the height of the logical resolution.
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
|
@ -834,9 +834,9 @@ extern DECLSPEC int SDLCALL SDL_RenderSetLogicalSize(SDL_Renderer * renderer, in
|
|||
* When using a target texture: Never return 0 for `w` and `h` at first. Then
|
||||
* it returns the logical width and height that are set.
|
||||
*
|
||||
* \param renderer a rendering context
|
||||
* \param w an int to be filled with the width
|
||||
* \param h an int to be filled with the height
|
||||
* \param renderer a rendering context.
|
||||
* \param w an int to be filled with the width.
|
||||
* \param h an int to be filled with the height.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
|
@ -851,8 +851,8 @@ extern DECLSPEC void SDLCALL SDL_RenderGetLogicalSize(SDL_Renderer * renderer, i
|
|||
* when a resolution is between two multiples of a logical size, the viewport
|
||||
* size is rounded down to the lower multiple.
|
||||
*
|
||||
* \param renderer the renderer for which integer scaling should be set
|
||||
* \param enable enable or disable the integer scaling for rendering
|
||||
* \param renderer the renderer for which integer scaling should be set.
|
||||
* \param enable enable or disable the integer scaling for rendering.
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
|
@ -867,7 +867,7 @@ extern DECLSPEC int SDLCALL SDL_RenderSetIntegerScale(SDL_Renderer * renderer,
|
|||
/**
|
||||
* Get whether integer scales are forced for resolution-independent rendering.
|
||||
*
|
||||
* \param renderer the renderer from which integer scaling should be queried
|
||||
* \param renderer the renderer from which integer scaling should be queried.
|
||||
* \returns SDL_TRUE if integer scales are forced or SDL_FALSE if not and on
|
||||
* failure; call SDL_GetError() for more information.
|
||||
*
|
||||
|
@ -883,9 +883,9 @@ extern DECLSPEC SDL_bool SDLCALL SDL_RenderGetIntegerScale(SDL_Renderer * render
|
|||
* When the window is resized, the viewport is reset to fill the entire new
|
||||
* window size.
|
||||
*
|
||||
* \param renderer the rendering context
|
||||
* \param renderer the rendering context.
|
||||
* \param rect the SDL_Rect structure representing the drawing area, or NULL
|
||||
* to set the viewport to the entire target
|
||||
* to set the viewport to the entire target.
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
|
@ -899,8 +899,8 @@ extern DECLSPEC int SDLCALL SDL_RenderSetViewport(SDL_Renderer * renderer,
|
|||
/**
|
||||
* Get the drawing area for the current target.
|
||||
*
|
||||
* \param renderer the rendering context
|
||||
* \param rect an SDL_Rect structure filled in with the current drawing area
|
||||
* \param renderer the rendering context.
|
||||
* \param rect an SDL_Rect structure filled in with the current drawing area.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
|
@ -913,9 +913,9 @@ extern DECLSPEC void SDLCALL SDL_RenderGetViewport(SDL_Renderer * renderer,
|
|||
* Set the clip rectangle for rendering on the specified target.
|
||||
*
|
||||
* \param renderer the rendering context for which clip rectangle should be
|
||||
* set
|
||||
* set.
|
||||
* \param rect an SDL_Rect structure representing the clip area, relative to
|
||||
* the viewport, or NULL to disable clipping
|
||||
* the viewport, or NULL to disable clipping.
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
|
@ -931,9 +931,9 @@ extern DECLSPEC int SDLCALL SDL_RenderSetClipRect(SDL_Renderer * renderer,
|
|||
* Get the clip rectangle for the current target.
|
||||
*
|
||||
* \param renderer the rendering context from which clip rectangle should be
|
||||
* queried
|
||||
* queried.
|
||||
* \param rect an SDL_Rect structure filled in with the current clipping area
|
||||
* or an empty rectangle if clipping is disabled
|
||||
* or an empty rectangle if clipping is disabled.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
|
@ -946,7 +946,7 @@ extern DECLSPEC void SDLCALL SDL_RenderGetClipRect(SDL_Renderer * renderer,
|
|||
/**
|
||||
* Get whether clipping is enabled on the given renderer.
|
||||
*
|
||||
* \param renderer the renderer from which clip state should be queried
|
||||
* \param renderer the renderer from which clip state should be queried.
|
||||
* \returns SDL_TRUE if clipping is enabled or SDL_FALSE if not; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
|
@ -969,9 +969,9 @@ extern DECLSPEC SDL_bool SDLCALL SDL_RenderIsClipEnabled(SDL_Renderer * renderer
|
|||
* will be handled using the appropriate quality hints. For best results use
|
||||
* integer scaling factors.
|
||||
*
|
||||
* \param renderer a rendering context
|
||||
* \param scaleX the horizontal scaling factor
|
||||
* \param scaleY the vertical scaling factor
|
||||
* \param renderer a rendering context.
|
||||
* \param scaleX the horizontal scaling factor.
|
||||
* \param scaleY the vertical scaling factor.
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
|
@ -986,9 +986,9 @@ extern DECLSPEC int SDLCALL SDL_RenderSetScale(SDL_Renderer * renderer,
|
|||
/**
|
||||
* Get the drawing scale for the current target.
|
||||
*
|
||||
* \param renderer the renderer from which drawing scale should be queried
|
||||
* \param scaleX a pointer filled in with the horizontal scaling factor
|
||||
* \param scaleY a pointer filled in with the vertical scaling factor
|
||||
* \param renderer the renderer from which drawing scale should be queried.
|
||||
* \param scaleX a pointer filled in with the horizontal scaling factor.
|
||||
* \param scaleY a pointer filled in with the vertical scaling factor.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
|
@ -1005,11 +1005,11 @@ extern DECLSPEC void SDLCALL SDL_RenderGetScale(SDL_Renderer * renderer,
|
|||
* and logical renderer size set
|
||||
*
|
||||
* \param renderer the renderer from which the logical coordinates should be
|
||||
* calculated
|
||||
* \param windowX the real X coordinate in the window
|
||||
* \param windowY the real Y coordinate in the window
|
||||
* \param logicalX the pointer filled with the logical x coordinate
|
||||
* \param logicalY the pointer filled with the logical y coordinate
|
||||
* calculated.
|
||||
* \param windowX the real X coordinate in the window.
|
||||
* \param windowY the real Y coordinate in the window.
|
||||
* \param logicalX the pointer filled with the logical x coordinate.
|
||||
* \param logicalY the pointer filled with the logical y coordinate.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*
|
||||
|
@ -1031,11 +1031,11 @@ extern DECLSPEC void SDLCALL SDL_RenderWindowToLogical(SDL_Renderer * renderer,
|
|||
* and logical renderer size set
|
||||
*
|
||||
* \param renderer the renderer from which the window coordinates should be
|
||||
* calculated
|
||||
* \param logicalX the logical x coordinate
|
||||
* \param logicalY the logical y coordinate
|
||||
* \param windowX the pointer filled with the real X coordinate in the window
|
||||
* \param windowY the pointer filled with the real Y coordinate in the window
|
||||
* calculated.
|
||||
* \param logicalX the logical x coordinate.
|
||||
* \param logicalY the logical y coordinate.
|
||||
* \param windowX the pointer filled with the real X coordinate in the window.
|
||||
* \param windowY the pointer filled with the real Y coordinate in the window.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*
|
||||
|
@ -1054,13 +1054,13 @@ extern DECLSPEC void SDLCALL SDL_RenderLogicalToWindow(SDL_Renderer * renderer,
|
|||
* Set the color for drawing or filling rectangles, lines, and points, and for
|
||||
* SDL_RenderClear().
|
||||
*
|
||||
* \param renderer the rendering context
|
||||
* \param r the red value used to draw on the rendering target
|
||||
* \param g the green value used to draw on the rendering target
|
||||
* \param b the blue value used to draw on the rendering target
|
||||
* \param renderer the rendering context.
|
||||
* \param r the red value used to draw on the rendering target.
|
||||
* \param g the green value used to draw on the rendering target.
|
||||
* \param b the blue value used to draw on the rendering target.
|
||||
* \param a the alpha value used to draw on the rendering target; usually
|
||||
* `SDL_ALPHA_OPAQUE` (255). Use SDL_SetRenderDrawBlendMode to
|
||||
* specify how the alpha channel is used
|
||||
* specify how the alpha channel is used.
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
|
@ -1084,15 +1084,15 @@ extern DECLSPEC int SDLCALL SDL_SetRenderDrawColor(SDL_Renderer * renderer,
|
|||
/**
|
||||
* Get the color used for drawing operations (Rect, Line and Clear).
|
||||
*
|
||||
* \param renderer the rendering context
|
||||
* \param renderer the rendering context.
|
||||
* \param r a pointer filled in with the red value used to draw on the
|
||||
* rendering target
|
||||
* rendering target.
|
||||
* \param g a pointer filled in with the green value used to draw on the
|
||||
* rendering target
|
||||
* rendering target.
|
||||
* \param b a pointer filled in with the blue value used to draw on the
|
||||
* rendering target
|
||||
* rendering target.
|
||||
* \param a a pointer filled in with the alpha value used to draw on the
|
||||
* rendering target; usually `SDL_ALPHA_OPAQUE` (255)
|
||||
* rendering target; usually `SDL_ALPHA_OPAQUE` (255).
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
|
@ -1109,8 +1109,8 @@ extern DECLSPEC int SDLCALL SDL_GetRenderDrawColor(SDL_Renderer * renderer,
|
|||
*
|
||||
* If the blend mode is not supported, the closest supported mode is chosen.
|
||||
*
|
||||
* \param renderer the rendering context
|
||||
* \param blendMode the SDL_BlendMode to use for blending
|
||||
* \param renderer the rendering context.
|
||||
* \param blendMode the SDL_BlendMode to use for blending.
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
|
@ -1132,8 +1132,8 @@ extern DECLSPEC int SDLCALL SDL_SetRenderDrawBlendMode(SDL_Renderer * renderer,
|
|||
/**
|
||||
* Get the blend mode used for drawing operations.
|
||||
*
|
||||
* \param renderer the rendering context
|
||||
* \param blendMode a pointer filled in with the current SDL_BlendMode
|
||||
* \param renderer the rendering context.
|
||||
* \param blendMode a pointer filled in with the current SDL_BlendMode.
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
|
@ -1150,7 +1150,7 @@ extern DECLSPEC int SDLCALL SDL_GetRenderDrawBlendMode(SDL_Renderer * renderer,
|
|||
* This function clears the entire rendering target, ignoring the viewport and
|
||||
* the clip rectangle.
|
||||
*
|
||||
* \param renderer the rendering context
|
||||
* \param renderer the rendering context.
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
|
@ -1166,9 +1166,9 @@ extern DECLSPEC int SDLCALL SDL_RenderClear(SDL_Renderer * renderer);
|
|||
* SDL_RenderDrawPoint() draws a single point. If you want to draw multiple,
|
||||
* use SDL_RenderDrawPoints() instead.
|
||||
*
|
||||
* \param renderer the rendering context
|
||||
* \param x the x coordinate of the point
|
||||
* \param y the y coordinate of the point
|
||||
* \param renderer the rendering context.
|
||||
* \param x the x coordinate of the point.
|
||||
* \param y the y coordinate of the point.
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
|
@ -1191,10 +1191,10 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawPoint(SDL_Renderer * renderer,
|
|||
/**
|
||||
* Draw multiple points on the current rendering target.
|
||||
*
|
||||
* \param renderer the rendering context
|
||||
* \param renderer the rendering context.
|
||||
* \param points an array of SDL_Point structures that represent the points to
|
||||
* draw
|
||||
* \param count the number of points to draw
|
||||
* draw.
|
||||
* \param count the number of points to draw.
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
|
@ -1221,11 +1221,11 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawPoints(SDL_Renderer * renderer,
|
|||
* SDL_RenderDrawLine() draws the line to include both end points. If you want
|
||||
* to draw multiple, connecting lines use SDL_RenderDrawLines() instead.
|
||||
*
|
||||
* \param renderer the rendering context
|
||||
* \param x1 the x coordinate of the start point
|
||||
* \param y1 the y coordinate of the start point
|
||||
* \param x2 the x coordinate of the end point
|
||||
* \param y2 the y coordinate of the end point
|
||||
* \param renderer the rendering context.
|
||||
* \param x1 the x coordinate of the start point.
|
||||
* \param y1 the y coordinate of the start point.
|
||||
* \param x2 the x coordinate of the end point.
|
||||
* \param y2 the y coordinate of the end point.
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
|
@ -1248,10 +1248,10 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawLine(SDL_Renderer * renderer,
|
|||
/**
|
||||
* Draw a series of connected lines on the current rendering target.
|
||||
*
|
||||
* \param renderer the rendering context
|
||||
* \param renderer the rendering context.
|
||||
* \param points an array of SDL_Point structures representing points along
|
||||
* the lines
|
||||
* \param count the number of points, drawing count-1 lines
|
||||
* the lines.
|
||||
* \param count the number of points, drawing count-1 lines.
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
|
@ -1275,9 +1275,9 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawLines(SDL_Renderer * renderer,
|
|||
/**
|
||||
* Draw a rectangle on the current rendering target.
|
||||
*
|
||||
* \param renderer the rendering context
|
||||
* \param renderer the rendering context.
|
||||
* \param rect an SDL_Rect structure representing the rectangle to draw, or
|
||||
* NULL to outline the entire rendering target
|
||||
* NULL to outline the entire rendering target.
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
|
@ -1300,10 +1300,10 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawRect(SDL_Renderer * renderer,
|
|||
/**
|
||||
* Draw some number of rectangles on the current rendering target.
|
||||
*
|
||||
* \param renderer the rendering context
|
||||
* \param renderer the rendering context.
|
||||
* \param rects an array of SDL_Rect structures representing the rectangles to
|
||||
* be drawn
|
||||
* \param count the number of rectangles
|
||||
* be drawn.
|
||||
* \param count the number of rectangles.
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
|
@ -1331,9 +1331,9 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawRects(SDL_Renderer * renderer,
|
|||
* color's alpha value is ignored unless blending is enabled with the
|
||||
* appropriate call to SDL_SetRenderDrawBlendMode().
|
||||
*
|
||||
* \param renderer the rendering context
|
||||
* \param renderer the rendering context.
|
||||
* \param rect the SDL_Rect structure representing the rectangle to fill, or
|
||||
* NULL for the entire rendering target
|
||||
* NULL for the entire rendering target.
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
|
@ -1357,10 +1357,10 @@ extern DECLSPEC int SDLCALL SDL_RenderFillRect(SDL_Renderer * renderer,
|
|||
* Fill some number of rectangles on the current rendering target with the
|
||||
* drawing color.
|
||||
*
|
||||
* \param renderer the rendering context
|
||||
* \param renderer the rendering context.
|
||||
* \param rects an array of SDL_Rect structures representing the rectangles to
|
||||
* be filled
|
||||
* \param count the number of rectangles
|
||||
* be filled.
|
||||
* \param count the number of rectangles.
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
|
@ -1391,12 +1391,13 @@ extern DECLSPEC int SDLCALL SDL_RenderFillRects(SDL_Renderer * renderer,
|
|||
* The texture alpha is affected based on its alpha modulation set by
|
||||
* SDL_SetTextureAlphaMod().
|
||||
*
|
||||
* \param renderer the rendering context
|
||||
* \param texture the source texture
|
||||
* \param srcrect the source SDL_Rect structure or NULL for the entire texture
|
||||
* \param renderer the rendering context.
|
||||
* \param texture the source texture.
|
||||
* \param srcrect the source SDL_Rect structure or NULL for the entire
|
||||
* texture.
|
||||
* \param dstrect the destination SDL_Rect structure or NULL for the entire
|
||||
* rendering target; the texture will be stretched to fill the
|
||||
* given rectangle
|
||||
* given rectangle.
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
|
@ -1429,18 +1430,19 @@ extern DECLSPEC int SDLCALL SDL_RenderCopy(SDL_Renderer * renderer,
|
|||
* The texture alpha is affected based on its alpha modulation set by
|
||||
* SDL_SetTextureAlphaMod().
|
||||
*
|
||||
* \param renderer the rendering context
|
||||
* \param texture the source texture
|
||||
* \param srcrect the source SDL_Rect structure or NULL for the entire texture
|
||||
* \param renderer the rendering context.
|
||||
* \param texture the source texture.
|
||||
* \param srcrect the source SDL_Rect structure or NULL for the entire
|
||||
* texture.
|
||||
* \param dstrect the destination SDL_Rect structure or NULL for the entire
|
||||
* rendering target
|
||||
* rendering target.
|
||||
* \param angle an angle in degrees that indicates the rotation that will be
|
||||
* applied to dstrect, rotating it in a clockwise direction
|
||||
* applied to dstrect, rotating it in a clockwise direction.
|
||||
* \param center a pointer to a point indicating the point around which
|
||||
* dstrect will be rotated (if NULL, rotation will be done
|
||||
* around `dstrect.w / 2`, `dstrect.h / 2`)
|
||||
* around `dstrect.w / 2`, `dstrect.h / 2`).
|
||||
* \param flip a SDL_RendererFlip value stating which flipping actions should
|
||||
* be performed on the texture
|
||||
* be performed on the texture.
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
|
@ -1466,7 +1468,7 @@ extern DECLSPEC int SDLCALL SDL_RenderCopyEx(SDL_Renderer * renderer,
|
|||
* \param renderer The renderer which should draw a point.
|
||||
* \param x The x coordinate of the point.
|
||||
* \param y The y coordinate of the point.
|
||||
* \return 0 on success, or -1 on error
|
||||
* \return 0 on success, or -1 on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.10.
|
||||
*/
|
||||
|
@ -1477,9 +1479,9 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawPointF(SDL_Renderer * renderer,
|
|||
* Draw multiple points on the current rendering target at subpixel precision.
|
||||
*
|
||||
* \param renderer The renderer which should draw multiple points.
|
||||
* \param points The points to draw
|
||||
* \param count The number of points to draw
|
||||
* \return 0 on success, or -1 on error
|
||||
* \param points The points to draw.
|
||||
* \param count The number of points to draw.
|
||||
* \return 0 on success, or -1 on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.10.
|
||||
*/
|
||||
|
@ -1495,7 +1497,7 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawPointsF(SDL_Renderer * renderer,
|
|||
* \param y1 The y coordinate of the start point.
|
||||
* \param x2 The x coordinate of the end point.
|
||||
* \param y2 The y coordinate of the end point.
|
||||
* \return 0 on success, or -1 on error
|
||||
* \return 0 on success, or -1 on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.10.
|
||||
*/
|
||||
|
@ -1507,9 +1509,9 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawLineF(SDL_Renderer * renderer,
|
|||
* subpixel precision.
|
||||
*
|
||||
* \param renderer The renderer which should draw multiple lines.
|
||||
* \param points The points along the lines
|
||||
* \param count The number of points, drawing count-1 lines
|
||||
* \return 0 on success, or -1 on error
|
||||
* \param points The points along the lines.
|
||||
* \param count The number of points, drawing count-1 lines.
|
||||
* \return 0 on success, or -1 on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.10.
|
||||
*/
|
||||
|
@ -1523,7 +1525,7 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawLinesF(SDL_Renderer * renderer,
|
|||
* \param renderer The renderer which should draw a rectangle.
|
||||
* \param rect A pointer to the destination rectangle, or NULL to outline the
|
||||
* entire rendering target.
|
||||
* \return 0 on success, or -1 on error
|
||||
* \return 0 on success, or -1 on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.10.
|
||||
*/
|
||||
|
@ -1537,7 +1539,7 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawRectF(SDL_Renderer * renderer,
|
|||
* \param renderer The renderer which should draw multiple rectangles.
|
||||
* \param rects A pointer to an array of destination rectangles.
|
||||
* \param count The number of rectangles.
|
||||
* \return 0 on success, or -1 on error
|
||||
* \return 0 on success, or -1 on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.10.
|
||||
*/
|
||||
|
@ -1552,7 +1554,7 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawRectsF(SDL_Renderer * renderer,
|
|||
* \param renderer The renderer which should fill a rectangle.
|
||||
* \param rect A pointer to the destination rectangle, or NULL for the entire
|
||||
* rendering target.
|
||||
* \return 0 on success, or -1 on error
|
||||
* \return 0 on success, or -1 on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.10.
|
||||
*/
|
||||
|
@ -1566,7 +1568,7 @@ extern DECLSPEC int SDLCALL SDL_RenderFillRectF(SDL_Renderer * renderer,
|
|||
* \param renderer The renderer which should fill multiple rectangles.
|
||||
* \param rects A pointer to an array of destination rectangles.
|
||||
* \param count The number of rectangles.
|
||||
* \return 0 on success, or -1 on error
|
||||
* \return 0 on success, or -1 on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.10.
|
||||
*/
|
||||
|
@ -1584,7 +1586,7 @@ extern DECLSPEC int SDLCALL SDL_RenderFillRectsF(SDL_Renderer * renderer,
|
|||
* texture.
|
||||
* \param dstrect A pointer to the destination rectangle, or NULL for the
|
||||
* entire rendering target.
|
||||
* \return 0 on success, or -1 on error
|
||||
* \return 0 on success, or -1 on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.10.
|
||||
*/
|
||||
|
@ -1604,13 +1606,13 @@ extern DECLSPEC int SDLCALL SDL_RenderCopyF(SDL_Renderer * renderer,
|
|||
* \param dstrect A pointer to the destination rectangle, or NULL for the
|
||||
* entire rendering target.
|
||||
* \param angle An angle in degrees that indicates the rotation that will be
|
||||
* applied to dstrect, rotating it in a clockwise direction
|
||||
* applied to dstrect, rotating it in a clockwise direction.
|
||||
* \param center A pointer to a point indicating the point around which
|
||||
* dstrect will be rotated (if NULL, rotation will be done
|
||||
* around dstrect.w/2, dstrect.h/2).
|
||||
* \param flip An SDL_RendererFlip value stating which flipping actions should
|
||||
* be performed on the texture
|
||||
* \return 0 on success, or -1 on error
|
||||
* be performed on the texture.
|
||||
* \return 0 on success, or -1 on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.10.
|
||||
*/
|
||||
|
@ -1635,7 +1637,7 @@ extern DECLSPEC int SDLCALL SDL_RenderCopyExF(SDL_Renderer * renderer,
|
|||
* array, if NULL all vertices will be rendered in sequential
|
||||
* order.
|
||||
* \param num_indices Number of indices.
|
||||
* \return 0 on success, or -1 if the operation is not supported
|
||||
* \return 0 on success, or -1 if the operation is not supported.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*
|
||||
|
@ -1654,18 +1656,18 @@ extern DECLSPEC int SDLCALL SDL_RenderGeometry(SDL_Renderer *renderer,
|
|||
*
|
||||
* \param renderer The rendering context.
|
||||
* \param texture (optional) The SDL texture to use.
|
||||
* \param xy Vertex positions
|
||||
* \param xy_stride Byte size to move from one element to the next element
|
||||
* \param color Vertex colors (as SDL_Color)
|
||||
* \param color_stride Byte size to move from one element to the next element
|
||||
* \param uv Vertex normalized texture coordinates
|
||||
* \param uv_stride Byte size to move from one element to the next element
|
||||
* \param xy Vertex positions.
|
||||
* \param xy_stride Byte size to move from one element to the next element.
|
||||
* \param color Vertex colors (as SDL_Color).
|
||||
* \param color_stride Byte size to move from one element to the next element.
|
||||
* \param uv Vertex normalized texture coordinates.
|
||||
* \param uv_stride Byte size to move from one element to the next element.
|
||||
* \param num_vertices Number of vertices.
|
||||
* \param indices (optional) An array of indices into the 'vertices' arrays,
|
||||
* if NULL all vertices will be rendered in sequential order.
|
||||
* \param num_indices Number of indices.
|
||||
* \param size_indices Index size: 1 (byte), 2 (short), 4 (int)
|
||||
* \return 0 on success, or -1 if the operation is not supported
|
||||
* \param size_indices Index size: 1 (byte), 2 (short), 4 (int).
|
||||
* \return 0 on success, or -1 if the operation is not supported.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*
|
||||
|
@ -1694,13 +1696,13 @@ extern DECLSPEC int SDLCALL SDL_RenderGeometryRaw(SDL_Renderer *renderer,
|
|||
* but it might contain additional padding (for example, 24bit RGB Windows
|
||||
* Bitmap data pads all rows to multiples of 4 bytes).
|
||||
*
|
||||
* \param renderer the rendering context
|
||||
* \param renderer the rendering context.
|
||||
* \param rect an SDL_Rect structure representing the area to read, or NULL
|
||||
* for the entire render target
|
||||
* for the entire render target.
|
||||
* \param format an SDL_PixelFormatEnum value of the desired format of the
|
||||
* pixel data, or 0 to use the format of the rendering target
|
||||
* \param pixels a pointer to the pixel data to copy into
|
||||
* \param pitch the pitch of the `pixels` parameter
|
||||
* pixel data, or 0 to use the format of the rendering target.
|
||||
* \param pixels a pointer to the pixel data to copy into.
|
||||
* \param pitch the pitch of the `pixels` parameter.
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
|
@ -1730,7 +1732,7 @@ extern DECLSPEC int SDLCALL SDL_RenderReadPixels(SDL_Renderer * renderer,
|
|||
* starting each new frame's drawing, even if you plan to overwrite every
|
||||
* pixel.
|
||||
*
|
||||
* \param renderer the rendering context
|
||||
* \param renderer the rendering context.
|
||||
*
|
||||
* \threadsafety You may only call this function on the main thread. If this
|
||||
* happens to work on a background thread on any given platform
|
||||
|
@ -1759,7 +1761,7 @@ extern DECLSPEC void SDLCALL SDL_RenderPresent(SDL_Renderer * renderer);
|
|||
* Passing NULL or an otherwise invalid texture will set the SDL error message
|
||||
* to "Invalid texture".
|
||||
*
|
||||
* \param texture the texture to destroy
|
||||
* \param texture the texture to destroy.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
|
@ -1774,7 +1776,7 @@ extern DECLSPEC void SDLCALL SDL_DestroyTexture(SDL_Texture * texture);
|
|||
* If `renderer` is NULL, this function will return immediately after setting
|
||||
* the SDL error message to "Invalid renderer". See SDL_GetError().
|
||||
*
|
||||
* \param renderer the rendering context
|
||||
* \param renderer the rendering context.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
|
@ -1805,7 +1807,7 @@ extern DECLSPEC void SDLCALL SDL_DestroyRenderer(SDL_Renderer * renderer);
|
|||
* and earlier, as earlier versions did not queue rendering commands at all,
|
||||
* instead flushing them to the OS immediately.
|
||||
*
|
||||
* \param renderer the rendering context
|
||||
* \param renderer the rendering context.
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
|
@ -1836,11 +1838,11 @@ extern DECLSPEC int SDLCALL SDL_RenderFlush(SDL_Renderer * renderer);
|
|||
* re-order the color channels in the shaders phase, so the uploaded texture
|
||||
* may have swapped color channels.
|
||||
*
|
||||
* \param texture the texture to bind to the current OpenGL/ES/ES2 context
|
||||
* \param texture the texture to bind to the current OpenGL/ES/ES2 context.
|
||||
* \param texw a pointer to a float value which will be filled with the
|
||||
* texture width or NULL if you don't need that value
|
||||
* texture width or NULL if you don't need that value.
|
||||
* \param texh a pointer to a float value which will be filled with the
|
||||
* texture height or NULL if you don't need that value
|
||||
* texture height or NULL if you don't need that value.
|
||||
* \returns 0 on success, or -1 if the operation is not supported; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
|
@ -1856,8 +1858,9 @@ extern DECLSPEC int SDLCALL SDL_GL_BindTexture(SDL_Texture *texture, float *texw
|
|||
*
|
||||
* See SDL_GL_BindTexture() for examples on how to use these functions
|
||||
*
|
||||
* \param texture the texture to unbind from the current OpenGL/ES/ES2 context
|
||||
* \returns 0 on success, or -1 if the operation is not supported
|
||||
* \param texture the texture to unbind from the current OpenGL/ES/ES2
|
||||
* context.
|
||||
* \returns 0 on success, or -1 if the operation is not supported.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
|
@ -1872,9 +1875,9 @@ extern DECLSPEC int SDLCALL SDL_GL_UnbindTexture(SDL_Texture *texture);
|
|||
* This function returns `void *`, so SDL doesn't have to include Metal's
|
||||
* headers, but it can be safely cast to a `CAMetalLayer *`.
|
||||
*
|
||||
* \param renderer The renderer to query
|
||||
* \param renderer The renderer to query.
|
||||
* \returns a `CAMetalLayer *` on success, or NULL if the renderer isn't a
|
||||
* Metal renderer
|
||||
* Metal renderer.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.8.
|
||||
*
|
||||
|
@ -1893,7 +1896,7 @@ extern DECLSPEC void *SDLCALL SDL_RenderGetMetalLayer(SDL_Renderer * renderer);
|
|||
* hidden/minimized/offscreen. This doesn't apply to command encoders for
|
||||
* render targets, just the window's backbuffer. Check your return values!
|
||||
*
|
||||
* \param renderer The renderer to query
|
||||
* \param renderer The renderer to query.
|
||||
* \returns an `id<MTLRenderCommandEncoder>` on success, or NULL if the
|
||||
* renderer isn't a Metal renderer or there was an error.
|
||||
*
|
||||
|
@ -1906,9 +1909,9 @@ extern DECLSPEC void *SDLCALL SDL_RenderGetMetalCommandEncoder(SDL_Renderer * re
|
|||
/**
|
||||
* Toggle VSync of the given renderer.
|
||||
*
|
||||
* \param renderer The renderer to toggle
|
||||
* \param vsync 1 for on, 0 for off. All other values are reserved
|
||||
* \returns a 0 int on success, or non-zero on failure
|
||||
* \param renderer The renderer to toggle.
|
||||
* \param vsync 1 for on, 0 for off. All other values are reserved.
|
||||
* \returns a 0 int on success, or non-zero on failure.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue