ycbcr_format(ycbcr_format),
width(width),
height(height),
- resource_pool(NULL)
+ resource_pool(nullptr)
{
pbo = 0;
texture_num[0] = texture_num[1] = 0;
pitches[CHANNEL_LUMA] = width;
pitches[CHANNEL_CHROMA] = width / ycbcr_format.chroma_subsampling_x;
- pixel_data = NULL;
+ pixel_data = nullptr;
+
+ register_uniform_sampler2d("tex_y", &uniform_tex_y);
+ register_uniform_sampler2d("tex_cbcr", &uniform_tex_cbcr);
}
YCbCr422InterleavedInput::~YCbCr422InterleavedInput()
check_error();
// Bind samplers.
- set_uniform_int(glsl_program_num, prefix, "tex_y", *sampler_num + 0);
- set_uniform_int(glsl_program_num, prefix, "tex_cbcr", *sampler_num + 1);
+ uniform_tex_y = *sampler_num + 0;
+ uniform_tex_cbcr = *sampler_num + 1;
*sampler_num += 2;
}