mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-26 01:30:51 +00:00
rubyFrameDirection / IN.frame_direction.
This commit is contained in:
parent
d1dc65f202
commit
b3d422b5cd
@ -104,10 +104,12 @@ struct cg_program
|
||||
CGparameter tex_size_f;
|
||||
CGparameter out_size_f;
|
||||
CGparameter frame_cnt_f;
|
||||
CGparameter frame_dir_f;
|
||||
CGparameter vid_size_v;
|
||||
CGparameter tex_size_v;
|
||||
CGparameter out_size_v;
|
||||
CGparameter frame_cnt_v;
|
||||
CGparameter frame_dir_v;
|
||||
CGparameter mvp;
|
||||
|
||||
struct cg_fbo_params fbo[MAX_SHADERS];
|
||||
@ -162,11 +164,13 @@ void gl_cg_set_params(unsigned width, unsigned height,
|
||||
set_param_2f(prg[active_index].tex_size_f, tex_width, tex_height);
|
||||
set_param_2f(prg[active_index].out_size_f, out_width, out_height);
|
||||
set_param_1f(prg[active_index].frame_cnt_f, (float)frame_count);
|
||||
set_param_1f(prg[active_index].frame_dir_f, g_extern.frame_is_reverse ? -1.0 : 1.0);
|
||||
|
||||
set_param_2f(prg[active_index].vid_size_v, width, height);
|
||||
set_param_2f(prg[active_index].tex_size_v, tex_width, tex_height);
|
||||
set_param_2f(prg[active_index].out_size_v, out_width, out_height);
|
||||
set_param_1f(prg[active_index].frame_cnt_v, (float)frame_count);
|
||||
set_param_1f(prg[active_index].frame_dir_v, g_extern.frame_is_reverse ? -1.0 : 1.0);
|
||||
|
||||
// Set orig texture.
|
||||
CGparameter param = prg[active_index].orig.tex;
|
||||
@ -935,10 +939,12 @@ bool gl_cg_init(const char *path)
|
||||
prg[i].tex_size_f = cgGetNamedParameter(prg[i].fprg, "IN.texture_size");
|
||||
prg[i].out_size_f = cgGetNamedParameter(prg[i].fprg, "IN.output_size");
|
||||
prg[i].frame_cnt_f = cgGetNamedParameter(prg[i].fprg, "IN.frame_count");
|
||||
prg[i].frame_dir_f = cgGetNamedParameter(prg[i].fprg, "IN.frame_direction");
|
||||
prg[i].vid_size_v = cgGetNamedParameter(prg[i].vprg, "IN.video_size");
|
||||
prg[i].tex_size_v = cgGetNamedParameter(prg[i].vprg, "IN.texture_size");
|
||||
prg[i].out_size_v = cgGetNamedParameter(prg[i].vprg, "IN.output_size");
|
||||
prg[i].frame_cnt_v = cgGetNamedParameter(prg[i].vprg, "IN.frame_count");
|
||||
prg[i].frame_dir_v = cgGetNamedParameter(prg[i].vprg, "IN.frame_direction");
|
||||
prg[i].mvp = cgGetNamedParameter(prg[i].vprg, "modelViewProj");
|
||||
if (prg[i].mvp)
|
||||
cgGLSetStateMatrixParameter(prg[i].mvp, CG_GL_MODELVIEW_PROJECTION_MATRIX, CG_GL_MATRIX_IDENTITY);
|
||||
|
@ -1035,6 +1035,9 @@ void gl_glsl_set_params(unsigned width, unsigned height,
|
||||
location = pglGetUniformLocation(gl_program[active_index], "rubyFrameCount");
|
||||
pglUniform1i(location, frame_count);
|
||||
|
||||
location = pglGetUniformLocation(gl_program[active_index], "rubyFrameDirection");
|
||||
pglUniform1i(location, g_extern.frame_is_reverse ? -1 : 1);
|
||||
|
||||
for (unsigned i = 0; i < gl_teximage_cnt; i++)
|
||||
{
|
||||
location = pglGetUniformLocation(gl_program[active_index], gl_teximage_uniforms[i]);
|
||||
|
Loading…
Reference in New Issue
Block a user