mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 21:32:45 +00:00
(D3D) Rewrite renderchain_set_mvp
This commit is contained in:
parent
4a41dbcda7
commit
784e7998c1
@ -556,7 +556,7 @@ void renderchain_set_mvp(void *data, void *vertex_program,
|
||||
D3DXMatrixMultiply(&proj, &ortho, &rot);
|
||||
D3DXMatrixTranspose(&tmp, &proj);
|
||||
|
||||
renderchain_set_shader_mvp(chain, &vPrg, tmp);
|
||||
renderchain_set_shader_mvp(chain, &vPrg, &tmp);
|
||||
}
|
||||
|
||||
void renderchain_convert_geometry(
|
||||
|
@ -178,7 +178,7 @@ void renderchain_destroy_stock_shader(void *data);
|
||||
|
||||
void renderchain_destroy_shader(void *data, int i);
|
||||
|
||||
void renderchain_set_shader_mvp(void *data, CGprogram *vPrg, D3DXMATRIX &tmp);
|
||||
void renderchain_set_shader_mvp(void *data, void *data, void *matrix_data);
|
||||
|
||||
void renderchain_set_shader_params(void *data, void *pass_data,
|
||||
unsigned video_w, unsigned video_h,
|
||||
|
@ -181,11 +181,13 @@ void renderchain_destroy_shader(void *data, int i)
|
||||
#endif
|
||||
}
|
||||
|
||||
void renderchain_set_shader_mvp(void *data, CGprogram *vPrg, D3DXMATRIX &tmp)
|
||||
void renderchain_set_shader_mvp(void *data, void *shader_data, void *matrix_data)
|
||||
{
|
||||
CGprogram *vPrg = (CGprogram*)shader_data;
|
||||
const D3DXMATRIX *matrix = (const D3DXMATRIX*)matrix_data;
|
||||
CGparameter cgpModelViewProj = cgGetNamedParameter(*vPrg, "modelViewProj");
|
||||
if (cgpModelViewProj)
|
||||
cgD3D9SetUniformMatrix(cgpModelViewProj, &tmp);
|
||||
cgD3D9SetUniformMatrix(cgpModelViewProj, matrix);
|
||||
}
|
||||
|
||||
#define set_cg_param(prog, param, val) do { \
|
||||
|
Loading…
x
Reference in New Issue
Block a user