Mercurial > sdl-ios-xcode
diff src/render/SDL_sysrender.h @ 5159:307ccc9c135e
Made it possible to create a texture of any format, even if not supported by the renderer.
This allows me to reduce the set of formats supported by the renderers to the most optimal set, for a nice speed boost.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Thu, 03 Feb 2011 00:19:40 -0800 |
parents | fb424691cfc7 |
children | 657543cc92f9 |
line wrap: on
line diff
--- a/src/render/SDL_sysrender.h Wed Feb 02 22:55:12 2011 -0800 +++ b/src/render/SDL_sysrender.h Thu Feb 03 00:19:40 2011 -0800 @@ -26,6 +26,7 @@ #include "SDL_render.h" #include "SDL_events.h" +#include "SDL_yuv_sw_c.h" /* The SDL 2D rendering system */ @@ -45,6 +46,13 @@ SDL_Renderer *renderer; + /* Support for formats not supported directly by the renderer */ + SDL_Texture *native; + SDL_SW_YUVTexture *yuv; + void *pixels; + int pitch; + SDL_Rect locked_rect; + void *driverdata; /**< Driver specific texture representation */ SDL_Texture *prev; @@ -58,8 +66,6 @@ void (*WindowEvent) (SDL_Renderer * renderer, const SDL_WindowEvent *event); int (*CreateTexture) (SDL_Renderer * renderer, SDL_Texture * texture); - int (*QueryTexturePixels) (SDL_Renderer * renderer, SDL_Texture * texture, - void **pixels, int *pitch); int (*SetTextureColorMod) (SDL_Renderer * renderer, SDL_Texture * texture); int (*SetTextureAlphaMod) (SDL_Renderer * renderer, @@ -70,11 +76,8 @@ const SDL_Rect * rect, const void *pixels, int pitch); int (*LockTexture) (SDL_Renderer * renderer, SDL_Texture * texture, - const SDL_Rect * rect, int markDirty, void **pixels, - int *pitch); + const SDL_Rect * rect, void **pixels, int *pitch); void (*UnlockTexture) (SDL_Renderer * renderer, SDL_Texture * texture); - void (*DirtyTexture) (SDL_Renderer * renderer, SDL_Texture * texture, - int numrects, const SDL_Rect * rects); int (*RenderClear) (SDL_Renderer * renderer); int (*RenderDrawPoints) (SDL_Renderer * renderer, const SDL_Point * points, int count);