mirror of
https://github.com/libretro/RetroArch
synced 2025-02-06 09:40:06 +00:00
Create d3d9x_constant_table_set_matrix
This commit is contained in:
parent
dbb9a43abe
commit
0e5ccd7c15
@ -574,6 +574,19 @@ void *d3d9x_constant_table_get_constant_by_name(void *_tbl,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void d3d9x_constant_table_set_matrix(LPDIRECT3DDEVICE9 dev,
|
||||
void *p,
|
||||
void *data, const void *_matrix)
|
||||
{
|
||||
#if defined(HAVE_D3DX)
|
||||
LPD3DXCONSTANTTABLE consttbl = (LPD3DXCONSTANTTABLE)p;
|
||||
D3DXHANDLE handle = (D3DXHANDLE)data;
|
||||
const D3DXMATRIX *matrix = (const D3DXMATRIX*)matrix;
|
||||
if (consttbl && dev && handle)
|
||||
consttbl->lpVtbl->SetMatrix(consttbl, dev, handle, matrix);
|
||||
#endif
|
||||
}
|
||||
|
||||
const bool d3d9x_constant_table_set_float(void *p,
|
||||
void *a,
|
||||
const void *b, float val)
|
||||
|
@ -656,6 +656,9 @@ bool d3d9x_compile_shader_from_file(
|
||||
void *pperrormsgs,
|
||||
void *ppconstanttable);
|
||||
|
||||
void d3d9x_constant_table_set_matrix(LPDIRECT3DDEVICE9 dev,
|
||||
void *p, void *data, const void *matrix);
|
||||
|
||||
const void *d3d9x_get_buffer_ptr(void *data);
|
||||
|
||||
const bool d3d9x_constant_table_set_float(void *p,
|
||||
|
@ -63,10 +63,6 @@
|
||||
#define ID3DXConstantTable_SetFloatArray(p,a,b,c,d) (p)->lpVtbl->SetFloatArray(p,a,b,c,d)
|
||||
#endif
|
||||
|
||||
#ifndef ID3DXConstantTable_SetMatrix
|
||||
#define ID3DXConstantTable_SetMatrix(p,a,b,c) ((p)->lpVtbl->SetMatrix(p,a,b,c))
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#define set_param_2f(param, xy, constanttable) ID3DXConstantTable_SetFloatArray(constanttable, d3dr, param, xy, 2)
|
||||
@ -604,8 +600,8 @@ static bool hlsl_set_mvp(void *data, void *shader_data, const void *mat_data)
|
||||
if (!program || !program->mvp)
|
||||
return false;
|
||||
|
||||
ID3DXConstantTable_SetMatrix(program->v_ctable, d3dr,
|
||||
program->mvp, &program->mvp_val);
|
||||
d3d9x_constant_table_set_matrix(d3dr, program->v_ctable,
|
||||
(void*)program->mvp, &program->mvp_val);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user