mirror of
https://github.com/libretro/RetroArch
synced 2025-02-28 12:40:23 +00:00
(D3D) Use libretro pixel format types
This commit is contained in:
parent
162ffd9586
commit
e89a712d8d
@ -735,7 +735,7 @@ bool renderchain_init(void *data, const video_info_t *video_info,
|
||||
void *dev_,
|
||||
void *shader_context,
|
||||
const void *final_viewport_,
|
||||
const void *info_data, PixelFormat fmt)
|
||||
const void *info_data, unsigned fmt)
|
||||
{
|
||||
const LinkInfo *info = (const LinkInfo*)info_data;
|
||||
renderchain_t *chain = (renderchain_t*)data;
|
||||
@ -752,7 +752,7 @@ bool renderchain_init(void *data, const video_info_t *video_info,
|
||||
chain->tracker = NULL;
|
||||
chain->final_viewport = (D3DVIEWPORT*)final_viewport_;
|
||||
chain->frame_count = 0;
|
||||
chain->pixel_size = (fmt == RGB565) ? 2 : 4;
|
||||
chain->pixel_size = (fmt == RETRO_PIXEL_FORMAT_RGB565) ? 2 : 4;
|
||||
|
||||
if (!renderchain_create_first_pass(chain, info, fmt))
|
||||
return false;
|
||||
@ -1097,7 +1097,7 @@ bool renderchain_create_first_pass(void *data, const void *info_data,
|
||||
|
||||
chain->prev.tex[i] = (LPDIRECT3DTEXTURE)d3d_texture_new(
|
||||
d3dr, NULL, info->tex_w, info->tex_h, 1, 0,
|
||||
fmt == RGB565 ? D3DFMT_R5G6B5 : D3DFMT_X8R8G8B8,
|
||||
(fmt == RETRO_PIXEL_FORMAT_RGB565) ? D3DFMT_R5G6B5 : D3DFMT_X8R8G8B8,
|
||||
D3DPOOL_MANAGED, 0, 0, 0, NULL, NULL);
|
||||
|
||||
if (!chain->prev.tex[i])
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "../video_state_tracker.h"
|
||||
#include "../video_shader_parse.h"
|
||||
#include "../inc/Cg/cg.h"
|
||||
#include "../../libretro.h"
|
||||
|
||||
struct Vertex
|
||||
{
|
||||
@ -36,12 +37,6 @@ struct LinkInfo
|
||||
struct video_shader_pass *pass;
|
||||
};
|
||||
|
||||
enum PixelFormat
|
||||
{
|
||||
RGB565 = 0,
|
||||
ARGB
|
||||
};
|
||||
|
||||
#define MAX_VARIABLES 64
|
||||
|
||||
enum
|
||||
@ -76,7 +71,7 @@ bool renderchain_init(void *data, const video_info_t *video_info,
|
||||
void *shader_data,
|
||||
const void *final_viewport_,
|
||||
const void *info_data,
|
||||
PixelFormat fmt);
|
||||
unsigned fmt);
|
||||
|
||||
void renderchain_clear(void *data);
|
||||
|
||||
@ -101,7 +96,7 @@ bool renderchain_render(void *chain_data, const void *data,
|
||||
unsigned width, unsigned height, unsigned pitch, unsigned rotation);
|
||||
|
||||
bool renderchain_create_first_pass(void *data,
|
||||
const void *info_data, PixelFormat fmt);
|
||||
const void *info_data, unsigned fmt);
|
||||
|
||||
void renderchain_set_vertices(
|
||||
void *data, void *pass_data,
|
||||
|
Loading…
x
Reference in New Issue
Block a user