Код: Выделить всё
bool TmrwRenderImpl::copyTexture(
std::optional& pass_copier,
const opengl::TmrwTexture& src_texture,
const opengl::TmrwTexture& dst_texture,
bool flip)
{
tmrw::opengl::TmrwPassRenderer* renderer =
flip ? pass_copier->second.get() : pass_copier->first.get();
std::string uniform_texture = "src_texture";
//std::span named_uniform_values = { uniform_texture };
return renderer->Render({ std::cref(src_texture) },
{ std::cref(dst_texture) })); //, named_uniform_values));
}
Я пытался объявить это разными способами:
1.
Код: Выделить всё
virtual bool Render(
std::span src_texture,
std::span dst_texture);
// , std::span named_uniform_values) = 0;
Код: Выделить всё
virtual absl::Status Render(
std::span src_texture,
std::span dst_texture);
// , std::span named_uniform_values) = 0;
Код: Выделить всё
virtual absl::Status Render(
const std::span& src_texture,
const std::span& dst_texture);
// , std::span named_uniform_values) = 0;
Пожалуйста, предложите, как объявить диапазоны ввода в функции Render, чтобы сделать ее компилируемой.
Подробнее здесь: https://stackoverflow.com/questions/798 ... ia-stdspan
Мобильная версия