Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-07-21 13:33:11 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-07-21 13:34:57 +0300
commitaa316c73e015be6bb7b93e59c779c53316510590 (patch)
tree46f32ce8d82563fbd251878f0a2a261ca6386d2e /intern/opensubdiv/opensubdiv_converter_capi.h
parente44fa4e6a9ec839f1ee2abca785261ecc78dff2b (diff)
OpenSubdiv: Prepare majority of things to have proper subdivided UV
Mainly the changes are related on establishing API to feed UV islands to OpenSubdiv, so it will know all the connectivity information and will be able to do proper interpolation. Island calculation is currently rather slow, not sure how to make it fast and not use lots of allocations. Shouldn't be THAT bad, since this code is only runs once when creating OSD mesh, and it's probably still faster than our orientation code.
Diffstat (limited to 'intern/opensubdiv/opensubdiv_converter_capi.h')
-rw-r--r--intern/opensubdiv/opensubdiv_converter_capi.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/intern/opensubdiv/opensubdiv_converter_capi.h b/intern/opensubdiv/opensubdiv_converter_capi.h
index 47c8dab49de..4448f108e8a 100644
--- a/intern/opensubdiv/opensubdiv_converter_capi.h
+++ b/intern/opensubdiv/opensubdiv_converter_capi.h
@@ -86,10 +86,16 @@ typedef struct OpenSubdiv_Converter {
/* Face-varying data. */
int (*get_num_uv_layers)(const OpenSubdiv_Converter *converter);
- void (*get_face_corner_uv)(const OpenSubdiv_Converter *converter,
- int face,
- int corner,
- float r_uv[2]);
+
+ void (*precalc_uv_layer)(const OpenSubdiv_Converter *converter, int layer);
+ void (*finish_uv_layer)(const OpenSubdiv_Converter *converter);
+
+ int (*get_num_uvs)(const OpenSubdiv_Converter *converter);
+ void (*get_uvs)(const OpenSubdiv_Converter *converter, float *uvs);
+
+ int (*get_face_corner_uv_index)(const OpenSubdiv_Converter *converter,
+ int face,
+ int corner);
void (*free_user_data)(const OpenSubdiv_Converter *converter);
void *user_data;