mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
d3d_texture_new - unnecessary casts
This commit is contained in:
parent
e7808e03d0
commit
edc72d477b
@ -1470,8 +1470,7 @@ static bool d3d_overlay_load(void *data,
|
|||||||
unsigned height = images[i].height;
|
unsigned height = images[i].height;
|
||||||
overlay_t *overlay = (overlay_t*)&d3d->overlays[i];
|
overlay_t *overlay = (overlay_t*)&d3d->overlays[i];
|
||||||
|
|
||||||
overlay->tex = (LPDIRECT3DTEXTURE)
|
overlay->tex = d3d_texture_new(d3d->dev, NULL,
|
||||||
d3d_texture_new(d3d->dev, NULL,
|
|
||||||
width, height, 1,
|
width, height, 1,
|
||||||
0,
|
0,
|
||||||
D3DFMT_A8R8G8B8,
|
D3DFMT_A8R8G8B8,
|
||||||
@ -1753,8 +1752,7 @@ static void d3d_set_menu_texture_frame(void *data,
|
|||||||
if (d3d->menu)
|
if (d3d->menu)
|
||||||
d3d_texture_free(d3d->menu->tex);
|
d3d_texture_free(d3d->menu->tex);
|
||||||
|
|
||||||
d3d->menu->tex = (LPDIRECT3DTEXTURE)
|
d3d->menu->tex = d3d_texture_new(d3d->dev, NULL,
|
||||||
d3d_texture_new(d3d->dev, NULL,
|
|
||||||
width, height, 1,
|
width, height, 1,
|
||||||
0, D3DFMT_A8R8G8B8,
|
0, D3DFMT_A8R8G8B8,
|
||||||
D3DPOOL_MANAGED, 0, 0, 0, NULL, NULL);
|
D3DPOOL_MANAGED, 0, 0, 0, NULL, NULL);
|
||||||
|
@ -893,8 +893,8 @@ static bool renderchain_create_first_pass(cg_renderchain_t *chain,
|
|||||||
if (!chain->prev.vertex_buf[i])
|
if (!chain->prev.vertex_buf[i])
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
chain->prev.tex[i] = (LPDIRECT3DTEXTURE)d3d_texture_new(
|
chain->prev.tex[i] = d3d_texture_new(d3dr, NULL,
|
||||||
d3dr, NULL, info->tex_w, info->tex_h, 1, 0,
|
info->tex_w, info->tex_h, 1, 0,
|
||||||
(fmt == RETRO_PIXEL_FORMAT_RGB565) ? D3DFMT_R5G6B5 : D3DFMT_X8R8G8B8,
|
(fmt == RETRO_PIXEL_FORMAT_RGB565) ? D3DFMT_R5G6B5 : D3DFMT_X8R8G8B8,
|
||||||
D3DPOOL_MANAGED, 0, 0, 0, NULL, NULL);
|
D3DPOOL_MANAGED, 0, 0, 0, NULL, NULL);
|
||||||
|
|
||||||
@ -963,13 +963,13 @@ static bool renderchain_set_pass_size(cg_renderchain_t *chain,
|
|||||||
|
|
||||||
pass->info.tex_w = width;
|
pass->info.tex_w = width;
|
||||||
pass->info.tex_h = height;
|
pass->info.tex_h = height;
|
||||||
pass->tex = (LPDIRECT3DTEXTURE)d3d_texture_new(
|
pass->tex = d3d_texture_new(d3dr, NULL,
|
||||||
d3dr, NULL, width, height, 1,
|
width, height, 1,
|
||||||
D3DUSAGE_RENDERTARGET,
|
D3DUSAGE_RENDERTARGET,
|
||||||
chain->passes.back().info.pass->fbo.fp_fbo ?
|
chain->passes.back().info.pass->fbo.fp_fbo ?
|
||||||
D3DFMT_A32B32G32R32F : D3DFMT_A8R8G8B8,
|
D3DFMT_A32B32G32R32F : D3DFMT_A8R8G8B8,
|
||||||
D3DPOOL_DEFAULT, 0, 0, 0,
|
D3DPOOL_DEFAULT, 0, 0, 0,
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
|
|
||||||
if (!pass->tex)
|
if (!pass->tex)
|
||||||
return false;
|
return false;
|
||||||
@ -1134,8 +1134,7 @@ static bool cg_d3d9_renderchain_add_lut(void *data,
|
|||||||
lut_info info;
|
lut_info info;
|
||||||
cg_renderchain_t *chain = (cg_renderchain_t*)data;
|
cg_renderchain_t *chain = (cg_renderchain_t*)data;
|
||||||
LPDIRECT3DDEVICE d3dr = chain->dev;
|
LPDIRECT3DDEVICE d3dr = chain->dev;
|
||||||
LPDIRECT3DTEXTURE lut = (LPDIRECT3DTEXTURE)
|
LPDIRECT3DTEXTURE lut = d3d_texture_new(d3dr,
|
||||||
d3d_texture_new(d3dr,
|
|
||||||
path,
|
path,
|
||||||
D3DX_DEFAULT_NONPOW2,
|
D3DX_DEFAULT_NONPOW2,
|
||||||
D3DX_DEFAULT_NONPOW2,
|
D3DX_DEFAULT_NONPOW2,
|
||||||
|
@ -104,7 +104,7 @@ static bool renderchain_create_first_pass(void *data,
|
|||||||
if (!chain->vertex_buf)
|
if (!chain->vertex_buf)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
chain->tex = (LPDIRECT3DTEXTURE)d3d_texture_new(d3dr, NULL,
|
chain->tex = d3d_texture_new(d3dr, NULL,
|
||||||
chain->tex_w, chain->tex_h, 1, 0,
|
chain->tex_w, chain->tex_h, 1, 0,
|
||||||
info->rgb32 ? D3DFMT_LIN_X8R8G8B8 : D3DFMT_LIN_R5G6B5,
|
info->rgb32 ? D3DFMT_LIN_X8R8G8B8 : D3DFMT_LIN_R5G6B5,
|
||||||
0, 0, 0, 0, NULL, NULL);
|
0, 0, 0, 0, NULL, NULL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user