Blender V4.3
subdiv_converter.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2018 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
11#include "BKE_subdiv.hh"
12
13/* NOTE: Was initially used to get proper enumerator types, but this makes
14 * it tricky to compile without OpenSubdiv. */
15/* #include "opensubdiv_converter_capi.hh" */
16
17struct Mesh;
19
20namespace blender::bke::subdiv {
21
22struct Settings;
23
25 const Settings *settings,
26 const Mesh *mesh);
27
28/* NOTE: Frees converter data, but not converter itself. This means, that if
29 * converter was allocated on heap, it is up to the user to free that memory. */
31
32/* ============================ INTERNAL HELPERS ============================ */
33
34/* TODO(sergey): Find a way to make it OpenSubdiv_VtxBoundaryInterpolation,
35 * without breaking compilation without OpenSubdiv. */
36int converter_vtx_boundary_interpolation_from_settings(const Settings *settings);
37
38/* TODO(sergey): Find a way to make it OpenSubdiv_FVarLinearInterpolation,
39 * without breaking compilation without OpenSubdiv. */
40int converter_fvar_linear_from_settings(const Settings *settings);
41
42} // namespace blender::bke::subdiv
void converter_init_for_mesh(OpenSubdiv_Converter *converter, const Settings *settings, const Mesh *mesh)
int converter_fvar_linear_from_settings(const Settings *settings)
int converter_vtx_boundary_interpolation_from_settings(const Settings *settings)
void converter_free(OpenSubdiv_Converter *converter)