(D3D) Cleanups

This commit is contained in:
twinaphex 2015-04-05 04:18:49 +02:00
parent 58112a1409
commit 122df894ff
2 changed files with 11 additions and 6 deletions

View File

@ -169,10 +169,10 @@ void renderchain_log_info(void *data, const void *info_data);
void renderchain_unbind_all(void *data);
bool renderchain_compile_shaders(void *data, CGprogram *fPrg,
CGprogram *vPrg, const std::string &shader);
bool renderchain_compile_shaders(void *data, void *fragment_data,
void *vertex_data, const std::string &shader);
void renderchain_set_shaders(void *data, CGprogram *fPrg, CGprogram *vPrg);
void renderchain_set_shaders(void *data, void *fragment_data, void *vertex_data);
void renderchain_destroy_stock_shader(void *data);

View File

@ -88,9 +88,11 @@ static INLINE CGparameter find_param_from_semantic(CGprogram prog,
return find_param_from_semantic(param, sem);
}
bool renderchain_compile_shaders(void *data, CGprogram *fPrg,
CGprogram *vPrg, const std::string &shader)
bool renderchain_compile_shaders(void *data, void *fragment_data,
void *vertex_data, const std::string &shader)
{
CGprogram *fPrg = (CGprogram*)fragment_data;
CGprogram *vPrg = (CGprogram*)vertex_data;
renderchain_t *chain = (renderchain_t*)data;
CGprofile vertex_profile = cgD3D9GetLatestVertexProfile();
CGprofile fragment_profile = cgD3D9GetLatestPixelProfile();
@ -140,8 +142,11 @@ bool renderchain_compile_shaders(void *data, CGprogram *fPrg,
return true;
}
void renderchain_set_shaders(void *data, CGprogram *fPrg, CGprogram *vPrg)
void renderchain_set_shaders(void *data, void *fragment_data, void *vertex_data)
{
CGprogram *fPrg = (CGprogram*)fragment_data;
CGprogram *vPrg = (CGprogram*)vertex_data;
cgD3D9BindProgram(*fPrg);
cgD3D9BindProgram(*vPrg);
}