mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-01 23:48:29 +00:00
Make texture scale mode a part of the 2D renderer draw state
Also added texture addressing mode support to the PSP and Vita renderers (untested) Fixes https://github.com/libsdl-org/SDL/issues/12461
This commit is contained in:
@@ -34,6 +34,7 @@ extern "C" {
|
||||
|
||||
typedef enum SDL_TextureAddressMode
|
||||
{
|
||||
SDL_TEXTURE_ADDRESS_INVALID = -1,
|
||||
SDL_TEXTURE_ADDRESS_AUTO,
|
||||
SDL_TEXTURE_ADDRESS_CLAMP,
|
||||
SDL_TEXTURE_ADDRESS_WRAP,
|
||||
@@ -155,6 +156,7 @@ typedef struct SDL_RenderCommand
|
||||
SDL_FColor color;
|
||||
SDL_BlendMode blend;
|
||||
SDL_Texture *texture;
|
||||
SDL_ScaleMode texture_scale_mode;
|
||||
SDL_TextureAddressMode texture_address_mode;
|
||||
} draw;
|
||||
struct
|
||||
@@ -224,7 +226,6 @@ struct SDL_Renderer
|
||||
bool (*LockTexture)(SDL_Renderer *renderer, SDL_Texture *texture,
|
||||
const SDL_Rect *rect, void **pixels, int *pitch);
|
||||
void (*UnlockTexture)(SDL_Renderer *renderer, SDL_Texture *texture);
|
||||
void (*SetTextureScaleMode)(SDL_Renderer *renderer, SDL_Texture *texture, SDL_ScaleMode scaleMode);
|
||||
bool (*SetRenderTarget)(SDL_Renderer *renderer, SDL_Texture *texture);
|
||||
SDL_Surface *(*RenderReadPixels)(SDL_Renderer *renderer, const SDL_Rect *rect);
|
||||
bool (*RenderPresent)(SDL_Renderer *renderer);
|
||||
|
Reference in New Issue
Block a user