Mercurial > sdl-ios-xcode
changeset 5144:31e7f523ab3d
Making the API simpler, texture color and alpha modulation are supported by all renderers.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 31 Jan 2011 23:37:30 -0800 |
parents | e743b9c3f6d6 |
children | c8e049de174c |
files | include/SDL_video.h src/video/SDL_renderer_gl.c src/video/SDL_renderer_gles.c src/video/SDL_renderer_sw.c src/video/SDL_sysvideo.h src/video/SDL_video.c src/video/directfb/SDL_DirectFB_render.c src/video/nds/SDL_ndsrender.c src/video/photon/SDL_photon_render.c src/video/qnxgf/SDL_gf_render.c src/video/windows/SDL_d3drender.c |
diffstat | 11 files changed, 20 insertions(+), 214 deletions(-) [+] |
line wrap: on
line diff
--- a/include/SDL_video.h Mon Jan 31 23:23:57 2011 -0800 +++ b/include/SDL_video.h Mon Jan 31 23:37:30 2011 -0800 @@ -186,7 +186,6 @@ { const char *name; /**< The name of the renderer */ Uint32 flags; /**< Supported ::SDL_RendererFlags */ - Uint32 mod_modes; /**< A mask of supported channel modulation */ Uint32 num_texture_formats; /**< The number of available texture formats */ Uint32 texture_formats[50]; /**< The available texture formats */ int max_texture_width; /**< The maximimum texture width */
--- a/src/video/SDL_renderer_gl.c Mon Jan 31 23:23:57 2011 -0800 +++ b/src/video/SDL_renderer_gl.c Mon Jan 31 23:37:30 2011 -0800 @@ -79,10 +79,6 @@ static int GL_GetTexturePalette(SDL_Renderer * renderer, SDL_Texture * texture, SDL_Color * colors, int firstcolor, int ncolors); -static int GL_SetTextureColorMod(SDL_Renderer * renderer, - SDL_Texture * texture); -static int GL_SetTextureAlphaMod(SDL_Renderer * renderer, - SDL_Texture * texture); static int GL_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, const SDL_Rect * rect, const void *pixels, int pitch); @@ -118,8 +114,6 @@ "opengl", (SDL_RENDERER_SINGLEBUFFER | SDL_RENDERER_PRESENTDISCARD | SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_ACCELERATED), - (SDL_TEXTUREMODULATE_NONE | SDL_TEXTUREMODULATE_COLOR | - SDL_TEXTUREMODULATE_ALPHA), 15, { SDL_PIXELFORMAT_INDEX1LSB, @@ -291,8 +285,6 @@ renderer->QueryTexturePixels = GL_QueryTexturePixels; renderer->SetTexturePalette = GL_SetTexturePalette; renderer->GetTexturePalette = GL_GetTexturePalette; - renderer->SetTextureColorMod = GL_SetTextureColorMod; - renderer->SetTextureAlphaMod = GL_SetTextureAlphaMod; renderer->UpdateTexture = GL_UpdateTexture; renderer->LockTexture = GL_LockTexture; renderer->UnlockTexture = GL_UnlockTexture; @@ -948,18 +940,6 @@ } static int -GL_SetTextureColorMod(SDL_Renderer * renderer, SDL_Texture * texture) -{ - return 0; -} - -static int -GL_SetTextureAlphaMod(SDL_Renderer * renderer, SDL_Texture * texture) -{ - return 0; -} - -static int GL_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, const SDL_Rect * rect, const void *pixels, int pitch) {
--- a/src/video/SDL_renderer_gles.c Mon Jan 31 23:23:57 2011 -0800 +++ b/src/video/SDL_renderer_gles.c Mon Jan 31 23:37:30 2011 -0800 @@ -67,10 +67,6 @@ static int GLES_GetTexturePalette(SDL_Renderer * renderer, SDL_Texture * texture, SDL_Color * colors, int firstcolor, int ncolors); -static int GLES_SetTextureColorMod(SDL_Renderer * renderer, - SDL_Texture * texture); -static int GLES_SetTextureAlphaMod(SDL_Renderer * renderer, - SDL_Texture * texture); static int GLES_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, const SDL_Rect * rect, const void *pixels, int pitch); @@ -104,8 +100,6 @@ "opengl_es", (SDL_RENDERER_SINGLEBUFFER | SDL_RENDERER_PRESENTDISCARD | SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_ACCELERATED), - (SDL_TEXTUREMODULATE_NONE | SDL_TEXTUREMODULATE_COLOR | - SDL_TEXTUREMODULATE_ALPHA), { /* OpenGL ES 1.x supported formats list */ SDL_PIXELFORMAT_RGBA4444, @@ -231,8 +225,6 @@ renderer->QueryTexturePixels = GLES_QueryTexturePixels; renderer->SetTexturePalette = GLES_SetTexturePalette; renderer->GetTexturePalette = GLES_GetTexturePalette; - renderer->SetTextureColorMod = GLES_SetTextureColorMod; - renderer->SetTextureAlphaMod = GLES_SetTextureAlphaMod; renderer->UpdateTexture = GLES_UpdateTexture; renderer->LockTexture = GLES_LockTexture; renderer->UnlockTexture = GLES_UnlockTexture; @@ -497,18 +489,6 @@ } static int -GLES_SetTextureColorMod(SDL_Renderer * renderer, SDL_Texture * texture) -{ - return 0; -} - -static int -GLES_SetTextureAlphaMod(SDL_Renderer * renderer, SDL_Texture * texture) -{ - return 0; -} - -static int GLES_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, const SDL_Rect * rect, const void *pixels, int pitch) {
--- a/src/video/SDL_renderer_sw.c Mon Jan 31 23:23:57 2011 -0800 +++ b/src/video/SDL_renderer_sw.c Mon Jan 31 23:37:30 2011 -0800 @@ -49,6 +49,8 @@ SDL_Texture * texture); static int SW_SetTextureAlphaMod(SDL_Renderer * renderer, SDL_Texture * texture); +static int SW_SetTextureBlendMode(SDL_Renderer * renderer, + SDL_Texture * texture); static int SW_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, const SDL_Rect * rect, const void *pixels, int pitch); @@ -82,8 +84,6 @@ (SDL_RENDERER_SINGLEBUFFER | SDL_RENDERER_PRESENTCOPY | SDL_RENDERER_PRESENTFLIP2 | SDL_RENDERER_PRESENTFLIP3 | SDL_RENDERER_PRESENTDISCARD | SDL_RENDERER_PRESENTVSYNC), - (SDL_TEXTUREMODULATE_NONE | SDL_TEXTUREMODULATE_COLOR | - SDL_TEXTUREMODULATE_ALPHA), 14, { SDL_PIXELFORMAT_INDEX8, @@ -172,12 +172,12 @@ renderer->GetTexturePalette = SW_GetTexturePalette; renderer->SetTextureColorMod = SW_SetTextureColorMod; renderer->SetTextureAlphaMod = SW_SetTextureAlphaMod; + renderer->SetTextureBlendMode = SW_SetTextureBlendMode; renderer->UpdateTexture = SW_UpdateTexture; renderer->LockTexture = SW_LockTexture; renderer->UnlockTexture = SW_UnlockTexture; renderer->DestroyTexture = SW_DestroyTexture; - renderer->info.mod_modes = SW_RenderDriver.info.mod_modes; renderer->info.num_texture_formats = SW_RenderDriver.info.num_texture_formats; SDL_memcpy(renderer->info.texture_formats,
--- a/src/video/SDL_sysvideo.h Mon Jan 31 23:23:57 2011 -0800 +++ b/src/video/SDL_sysvideo.h Mon Jan 31 23:37:30 2011 -0800 @@ -86,8 +86,6 @@ void (*UnlockTexture) (SDL_Renderer * renderer, SDL_Texture * texture); void (*DirtyTexture) (SDL_Renderer * renderer, SDL_Texture * texture, int numrects, const SDL_Rect * rects); - int (*SetDrawColor) (SDL_Renderer * renderer); - int (*SetDrawBlendMode) (SDL_Renderer * renderer); int (*RenderClear) (SDL_Renderer * renderer); int (*RenderDrawPoints) (SDL_Renderer * renderer, const SDL_Point * points, int count);
--- a/src/video/SDL_video.c Mon Jan 31 23:23:57 2011 -0800 +++ b/src/video/SDL_video.c Mon Jan 31 23:37:30 2011 -0800 @@ -2074,7 +2074,11 @@ texture->r = r; texture->g = g; texture->b = b; - return renderer->SetTextureColorMod(renderer, texture); + if (renderer->SetTextureColorMod) { + return renderer->SetTextureColorMod(renderer, texture); + } else { + return 0; + } } int @@ -2116,7 +2120,11 @@ texture->modMode &= ~SDL_TEXTUREMODULATE_ALPHA; } texture->a = alpha; - return renderer->SetTextureAlphaMod(renderer, texture); + if (renderer->SetTextureAlphaMod) { + return renderer->SetTextureAlphaMod(renderer, texture); + } else { + return 0; + } } int @@ -2143,7 +2151,11 @@ return -1; } texture->blendMode = blendMode; - return renderer->SetTextureBlendMode(renderer, texture); + if (renderer->SetTextureBlendMode) { + return renderer->SetTextureBlendMode(renderer, texture); + } else { + return 0; + } } int @@ -2258,11 +2270,7 @@ renderer->g = g; renderer->b = b; renderer->a = a; - if (renderer->SetDrawColor) { - return renderer->SetDrawColor(renderer); - } else { - return 0; - } + return 0; } int @@ -2299,11 +2307,7 @@ return -1; } renderer->blendMode = blendMode; - if (renderer->SetDrawBlendMode) { - return renderer->SetDrawBlendMode(renderer); - } else { - return 0; - } + return 0; } int
--- a/src/video/directfb/SDL_DirectFB_render.c Mon Jan 31 23:23:57 2011 -0800 +++ b/src/video/directfb/SDL_DirectFB_render.c Mon Jan 31 23:37:30 2011 -0800 @@ -51,10 +51,6 @@ SDL_Texture * texture, SDL_Color * colors, int firstcolor, int ncolors); -static int DirectFB_SetTextureAlphaMod(SDL_Renderer * renderer, - SDL_Texture * texture); -static int DirectFB_SetTextureColorMod(SDL_Renderer * renderer, - SDL_Texture * texture); static int DirectFB_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, const SDL_Rect * rect, @@ -68,7 +64,6 @@ static void DirectFB_DirtyTexture(SDL_Renderer * renderer, SDL_Texture * texture, int numrects, const SDL_Rect * rects); -static int DirectFB_SetDrawBlendMode(SDL_Renderer * renderer); static int DirectFB_RenderDrawPoints(SDL_Renderer * renderer, const SDL_Point * points, int count); static int DirectFB_RenderDrawLines(SDL_Renderer * renderer, @@ -96,8 +91,6 @@ SDL_RENDERER_PRESENTFLIP2 | SDL_RENDERER_PRESENTFLIP3 | SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_PRESENTDISCARD | SDL_RENDERER_ACCELERATED), - (SDL_TEXTUREMODULATE_NONE | SDL_TEXTUREMODULATE_COLOR | - SDL_TEXTUREMODULATE_ALPHA), 14, { SDL_PIXELFORMAT_INDEX4LSB, @@ -275,16 +268,12 @@ renderer->QueryTexturePixels = DirectFB_QueryTexturePixels; renderer->SetTexturePalette = DirectFB_SetTexturePalette; renderer->GetTexturePalette = DirectFB_GetTexturePalette; - renderer->SetTextureAlphaMod = DirectFB_SetTextureAlphaMod; - renderer->SetTextureColorMod = DirectFB_SetTextureColorMod; renderer->UpdateTexture = DirectFB_UpdateTexture; renderer->LockTexture = DirectFB_LockTexture; renderer->UnlockTexture = DirectFB_UnlockTexture; renderer->DirtyTexture = DirectFB_DirtyTexture; renderer->RenderDrawPoints = DirectFB_RenderDrawPoints; renderer->RenderDrawLines = DirectFB_RenderDrawLines; - /* SetDrawColor - no needed */ - renderer->SetDrawBlendMode = DirectFB_SetDrawBlendMode; renderer->RenderFillRects = DirectFB_RenderFillRects; renderer->RenderDrawRects = DirectFB_RenderDrawRects; /* RenderDrawEllipse - no reference implementation yet */ @@ -636,18 +625,6 @@ } static int -DirectFB_SetTextureAlphaMod(SDL_Renderer * renderer, SDL_Texture * texture) -{ - return 0; -} - -static int -DirectFB_SetTextureColorMod(SDL_Renderer * renderer, SDL_Texture * texture) -{ - return 0; -} - -static int DirectFB_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture) { #if (DFB_VERSION_ATLEAST(1,2,0))
--- a/src/video/nds/SDL_ndsrender.c Mon Jan 31 23:23:57 2011 -0800 +++ b/src/video/nds/SDL_ndsrender.c Mon Jan 31 23:37:30 2011 -0800 @@ -50,10 +50,6 @@ static int NDS_GetTexturePalette(SDL_Renderer * renderer, SDL_Texture * texture, SDL_Color * colors, int firstcolor, int ncolors); -static int NDS_SetTextureColorMod(SDL_Renderer * renderer, - SDL_Texture * texture); -static int NDS_SetTextureAlphaMod(SDL_Renderer * renderer, - SDL_Texture * texture); static int NDS_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, const SDL_Rect * rect, const void *pixels, int pitch); @@ -76,7 +72,6 @@ NDS_CreateRenderer, {"nds", /* char* name */ (SDL_RENDERER_SINGLEBUFFER | SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTDISCARD | SDL_RENDERER_PRESENTVSYNC), /* u32 flags */ - (SDL_TEXTUREMODULATE_NONE), /* u32 mod_modes */ 3, /* u32 num_texture_formats */ { SDL_PIXELFORMAT_INDEX8, @@ -175,14 +170,11 @@ renderer->QueryTexturePixels = NDS_QueryTexturePixels; renderer->SetTexturePalette = NDS_SetTexturePalette; renderer->GetTexturePalette = NDS_GetTexturePalette; - renderer->SetTextureColorMod = NDS_SetTextureColorMod; - renderer->SetTextureAlphaMod = NDS_SetTextureAlphaMod; renderer->UpdateTexture = NDS_UpdateTexture; renderer->LockTexture = NDS_LockTexture; renderer->UnlockTexture = NDS_UnlockTexture; renderer->DestroyTexture = NDS_DestroyTexture; - renderer->info.mod_modes = NDS_RenderDriver.info.mod_modes; renderer->info.num_texture_formats = NDS_RenderDriver.info.num_texture_formats; SDL_memcpy(renderer->info.texture_formats, @@ -557,18 +549,4 @@ return 0; } -static int -NDS_SetTextureColorMod(SDL_Renderer * renderer, SDL_Texture * texture) -{ - /* stub! */ - return 0; -} - -static int -NDS_SetTextureAlphaMod(SDL_Renderer * renderer, SDL_Texture * texture) -{ - /* stub! */ - return 0; -} - /* vi: set ts=4 sw=4 expandtab: */
--- a/src/video/photon/SDL_photon_render.c Mon Jan 31 23:23:57 2011 -0800 +++ b/src/video/photon/SDL_photon_render.c Mon Jan 31 23:37:30 2011 -0800 @@ -54,12 +54,6 @@ static int photon_gettexturepalette(SDL_Renderer * renderer, SDL_Texture * texture, SDL_Color * colors, int firstcolor, int ncolors); -static int photon_settexturecolormod(SDL_Renderer * renderer, - SDL_Texture * texture); -static int photon_settexturealphamod(SDL_Renderer * renderer, - SDL_Texture * texture); -static int photon_settexturescalemode(SDL_Renderer * renderer, - SDL_Texture * texture); static int photon_updatetexture(SDL_Renderer * renderer, SDL_Texture * texture, const SDL_Rect * rect, const void *pixels, int pitch); @@ -71,7 +65,6 @@ static void photon_dirtytexture(SDL_Renderer * renderer, SDL_Texture * texture, int numrects, const SDL_Rect * rects); -static int photon_setdrawcolor(SDL_Renderer * renderer); static int photon_renderpoint(SDL_Renderer * renderer, int x, int y); static int photon_renderline(SDL_Renderer * renderer, int x1, int y1, int x2, int y2); @@ -98,7 +91,6 @@ SDL_RENDERER_PRESENTFLIP2 | SDL_RENDERER_PRESENTFLIP3 | SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_PRESENTDISCARD | SDL_RENDERER_ACCELERATED), - (SDL_TEXTUREMODULATE_NONE | SDL_TEXTUREMODULATE_ALPHA), 10, {SDL_PIXELFORMAT_INDEX8, SDL_PIXELFORMAT_RGB555, @@ -144,13 +136,10 @@ renderer->QueryTexturePixels = photon_querytexturepixels; renderer->SetTexturePalette = photon_settexturepalette; renderer->GetTexturePalette = photon_gettexturepalette; - renderer->SetTextureAlphaMod = photon_settexturealphamod; - renderer->SetTextureColorMod = photon_settexturecolormod; renderer->UpdateTexture = photon_updatetexture; renderer->LockTexture = photon_locktexture; renderer->UnlockTexture = photon_unlocktexture; renderer->DirtyTexture = photon_dirtytexture; - renderer->SetDrawColor = photon_setdrawcolor; renderer->RenderPoint = photon_renderpoint; renderer->RenderLine = photon_renderline; renderer->RenderFill = photon_renderfill; @@ -872,35 +861,6 @@ } static int -photon_settexturecolormod(SDL_Renderer * renderer, SDL_Texture * texture) -{ - SDL_Unsupported(); - return -1; -} - -static int -photon_settexturealphamod(SDL_Renderer * renderer, SDL_Texture * texture) -{ - SDL_RenderData *rdata = (SDL_RenderData *) renderer->driverdata; - - /* Check, if it is not initialized */ - if (rdata->surfaces_type==SDL_PHOTON_SURFTYPE_UNKNOWN) - { - SDL_SetError("Photon: can't set texture blend mode for OpenGL ES window"); - return -1; - } - - /* Check if current renderer instance supports alpha modulation */ - if ((renderer->info.mod_modes & SDL_TEXTUREMODULATE_ALPHA)!=SDL_TEXTUREMODULATE_ALPHA) - { - SDL_Unsupported(); - return -1; - } - - return 0; -} - -static int photon_updatetexture(SDL_Renderer * renderer, SDL_Texture * texture, const SDL_Rect * rect, const void *pixels, int pitch) { @@ -1025,33 +985,6 @@ } static int -photon_setdrawcolor(SDL_Renderer * renderer) -{ - SDL_RenderData *rdata = (SDL_RenderData *) renderer->driverdata; - - /* Check, if it is not initialized */ - if (rdata->surfaces_type==SDL_PHOTON_SURFTYPE_UNKNOWN) - { - SDL_SetError("Photon: can't set draw color for OpenGL ES window"); - return -1; - } - - switch (rdata->surfaces_type) - { - case SDL_PHOTON_SURFTYPE_OFFSCREEN: - case SDL_PHOTON_SURFTYPE_PHIMAGE: - PgSetFillColorCx(rdata->gc, PgRGB(renderer->r, renderer->g, renderer->b)); - PgSetStrokeColorCx(rdata->gc, PgRGB(renderer->r, renderer->g, renderer->b)); - break; - case SDL_PHOTON_SURFTYPE_UNKNOWN: - default: - break; - } - - return 0; -} - -static int photon_renderpoint(SDL_Renderer * renderer, int x, int y) { SDL_RenderData *rdata = (SDL_RenderData *) renderer->driverdata;
--- a/src/video/qnxgf/SDL_gf_render.c Mon Jan 31 23:23:57 2011 -0800 +++ b/src/video/qnxgf/SDL_gf_render.c Mon Jan 31 23:37:30 2011 -0800 @@ -48,12 +48,6 @@ static int gf_gettexturepalette(SDL_Renderer * renderer, SDL_Texture * texture, SDL_Color * colors, int firstcolor, int ncolors); -static int gf_settexturecolormod(SDL_Renderer * renderer, - SDL_Texture * texture); -static int gf_settexturealphamod(SDL_Renderer * renderer, - SDL_Texture * texture); -static int gf_settexturescalemode(SDL_Renderer * renderer, - SDL_Texture * texture); static int gf_updatetexture(SDL_Renderer * renderer, SDL_Texture * texture, const SDL_Rect * rect, const void *pixels, int pitch); @@ -81,8 +75,6 @@ SDL_RENDERER_PRESENTFLIP2 | SDL_RENDERER_PRESENTFLIP3 | SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_PRESENTDISCARD | SDL_RENDERER_ACCELERATED), - (SDL_TEXTUREMODULATE_NONE | SDL_TEXTUREMODULATE_COLOR | - SDL_TEXTUREMODULATE_ALPHA), 13, { SDL_PIXELFORMAT_INDEX8, @@ -141,8 +133,6 @@ renderer->QueryTexturePixels = gf_querytexturepixels; renderer->SetTexturePalette = gf_settexturepalette; renderer->GetTexturePalette = gf_gettexturepalette; - renderer->SetTextureAlphaMod = gf_settexturealphamod; - renderer->SetTextureColorMod = gf_settexturecolormod; renderer->UpdateTexture = gf_updatetexture; renderer->LockTexture = gf_locktexture; renderer->UnlockTexture = gf_unlocktexture; @@ -328,16 +318,6 @@ } static int -gf_settexturecolormod(SDL_Renderer * renderer, SDL_Texture * texture) -{ -} - -static int -gf_settexturealphamod(SDL_Renderer * renderer, SDL_Texture * texture) -{ -} - -static int gf_updatetexture(SDL_Renderer * renderer, SDL_Texture * texture, const SDL_Rect * rect, const void *pixels, int pitch) {
--- a/src/video/windows/SDL_d3drender.c Mon Jan 31 23:23:57 2011 -0800 +++ b/src/video/windows/SDL_d3drender.c Mon Jan 31 23:37:30 2011 -0800 @@ -101,12 +101,6 @@ static int D3D_GetTexturePalette(SDL_Renderer * renderer, SDL_Texture * texture, SDL_Color * colors, int firstcolor, int ncolors); -static int D3D_SetTextureColorMod(SDL_Renderer * renderer, - SDL_Texture * texture); -static int D3D_SetTextureAlphaMod(SDL_Renderer * renderer, - SDL_Texture * texture); -static int D3D_SetTextureBlendMode(SDL_Renderer * renderer, - SDL_Texture * texture); static int D3D_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, const SDL_Rect * rect, const void *pixels, int pitch); @@ -144,8 +138,6 @@ SDL_RENDERER_PRESENTFLIP2 | SDL_RENDERER_PRESENTFLIP3 | SDL_RENDERER_PRESENTDISCARD | SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_ACCELERATED), - (SDL_TEXTUREMODULATE_NONE | SDL_TEXTUREMODULATE_COLOR | - SDL_TEXTUREMODULATE_ALPHA), 0, {0}, 0, @@ -451,9 +443,6 @@ renderer->QueryTexturePixels = D3D_QueryTexturePixels; renderer->SetTexturePalette = D3D_SetTexturePalette; renderer->GetTexturePalette = D3D_GetTexturePalette; - renderer->SetTextureColorMod = D3D_SetTextureColorMod; - renderer->SetTextureAlphaMod = D3D_SetTextureAlphaMod; - renderer->SetTextureBlendMode = D3D_SetTextureBlendMode; renderer->UpdateTexture = D3D_UpdateTexture; renderer->LockTexture = D3D_LockTexture; renderer->UnlockTexture = D3D_UnlockTexture; @@ -728,18 +717,6 @@ } static int -D3D_SetTextureColorMod(SDL_Renderer * renderer, SDL_Texture * texture) -{ - return 0; -} - -static int -D3D_SetTextureAlphaMod(SDL_Renderer * renderer, SDL_Texture * texture) -{ - return 0; -} - -static int D3D_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, const SDL_Rect * rect, const void *pixels, int pitch) {