diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2015-08-01 22:06:58 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2015-08-01 22:06:58 +0300 |
commit | 4ade467fc6adfc13ce9e21d7e50b366fce70ea5f (patch) | |
tree | 968418721b08baacd47bab95877bc08812f3046a /source/blender/blenkernel/intern/CCGSubSurf.h | |
parent | 7759782ee7c4e654641c9f7abb51631c86e3f29c (diff) | |
parent | a3c5de3e3ca82d8ad5a28029f3ee9207929318a1 (diff) |
Merge branch 'master' into UI-graphical-redesign
Conflicts:
source/blender/blenkernel/BKE_blender.h
source/blender/blenloader/intern/versioning_270.c
source/blender/editors/interface/resources.c
source/blender/makesdna/DNA_userdef_types.h
Diffstat (limited to 'source/blender/blenkernel/intern/CCGSubSurf.h')
-rw-r--r-- | source/blender/blenkernel/intern/CCGSubSurf.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/CCGSubSurf.h b/source/blender/blenkernel/intern/CCGSubSurf.h index 2b86a2a66b2..23f7e71a311 100644 --- a/source/blender/blenkernel/intern/CCGSubSurf.h +++ b/source/blender/blenkernel/intern/CCGSubSurf.h @@ -80,6 +80,9 @@ void ccgSubSurf_free (CCGSubSurf *ss); CCGError ccgSubSurf_initFullSync (CCGSubSurf *ss); CCGError ccgSubSurf_initPartialSync (CCGSubSurf *ss); +#ifdef WITH_OPENSUBDIV +CCGError ccgSubSurf_initOpenSubdivSync (CCGSubSurf *ss); +#endif CCGError ccgSubSurf_syncVert (CCGSubSurf *ss, CCGVertHDL vHDL, const void *vertData, int seam, CCGVert **v_r); CCGError ccgSubSurf_syncEdge (CCGSubSurf *ss, CCGEdgeHDL eHDL, CCGVertHDL e_vHDL0, CCGVertHDL e_vHDL1, float crease, CCGEdge **e_r); @@ -190,4 +193,47 @@ CCGFace* ccgFaceIterator_getCurrent (CCGFaceIterator *fi); int ccgFaceIterator_isStopped (CCGFaceIterator *fi); void ccgFaceIterator_next (CCGFaceIterator *fi); +#ifdef WITH_OPENSUBDIV +struct DerivedMesh; + +/* Check if topology changed and evaluators are to be re-created. */ +void ccgSubSurf_checkTopologyChanged(CCGSubSurf *ss, struct DerivedMesh *dm); + +/* Create topology refiner from give derived mesh which then later will be + * used for GL mesh creation. + */ +void ccgSubSurf_prepareTopologyRefiner(CCGSubSurf *ss, struct DerivedMesh *dm); + +/* Make sure GL mesh exists, up to date and ready to draw. */ +bool ccgSubSurf_prepareGLMesh(CCGSubSurf *ss, bool use_osd_glsl); + +/* Draw given partitions of the GL mesh. + * + * TODO(sergey): fill_quads is actually an invariant and should be part + * of the prepare routine. + */ +void ccgSubSurf_drawGLMesh(CCGSubSurf *ss, bool fill_quads, + int start_partition, int num_partitions); + +/* Controls whether CCG are needed (Cmeaning CPU evaluation) or fully GPU compute + * and draw is allowed. + */ +void ccgSubSurf_setSkipGrids(CCGSubSurf *ss, bool skip_grids); +bool ccgSubSurf_needGrids(CCGSubSurf *ss); + +/* Set evaluator's face varying data from UV coordinates. + * Used for CPU evaluation. + */ +void ccgSubSurf_evaluatorSetFVarUV(CCGSubSurf *ss, + struct DerivedMesh *dm, + int layer_index); + +/* TODO(sergey): Temporary call to test things. */ +void ccgSubSurf_evaluatorFVarUV(CCGSubSurf *ss, + int face_index, int S, + float grid_u, float grid_v, + float uv[2]); + +#endif + #endif /* __CCGSUBSURF_H__ */ |