mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-15 01:08:26 +00:00
Made texture size and format public in the API
Also added refcount to textures so they can be retained by application code.
This commit is contained in:
parent
5136b30652
commit
1f3a0d12e6
8 changed files with 76 additions and 66 deletions
|
@ -118,11 +118,27 @@ typedef enum SDL_RendererLogicalPresentation
|
|||
*/
|
||||
typedef struct SDL_Renderer SDL_Renderer;
|
||||
|
||||
#ifndef SDL_INTERNAL
|
||||
/**
|
||||
* An efficient driver-specific representation of pixel data
|
||||
*
|
||||
* \since This struct is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_CreateTexture
|
||||
* \sa SDL_CreateTextureFromSurface
|
||||
* \sa SDL_CreateTextureWithProperties
|
||||
* \sa SDL_DestroyTexture
|
||||
*/
|
||||
struct SDL_Texture
|
||||
{
|
||||
SDL_PixelFormat format; /**< The format of the texture, read-only */
|
||||
int w; /**< The width of the texture, read-only. */
|
||||
int h; /**< The height of the texture, read-only. */
|
||||
|
||||
int refcount; /**< Application reference count, used when freeing texture */
|
||||
};
|
||||
#endif /* !SDL_INTERNAL */
|
||||
|
||||
typedef struct SDL_Texture SDL_Texture;
|
||||
|
||||
/* Function prototypes */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue