diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-07-19 10:28:54 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-07-20 15:16:38 +0300 |
commit | f0f60d775def20ff3a3699704b33c66712d50c6a (patch) | |
tree | c9c4ec927a9eb447e1a0f9753a74eb99c470d5b5 /intern/opensubdiv/opensubdiv_capi.h | |
parent | 9a0634a253421c02dbb6d2864db49e4d382ea2a3 (diff) |
OpenSubdiv: Initial work to support UV maps in textured OSD viewport
A bit work in progress, currently the following limitations:
- Texture shading only, Material shading will come later
- No UVs subdivision yet
- Always uses active UV and currently changing active UV will
not properly update the viewport.
Well, need to start somewhere :)
Diffstat (limited to 'intern/opensubdiv/opensubdiv_capi.h')
-rw-r--r-- | intern/opensubdiv/opensubdiv_capi.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/intern/opensubdiv/opensubdiv_capi.h b/intern/opensubdiv/opensubdiv_capi.h index b40505b197d..0410083304e 100644 --- a/intern/opensubdiv/opensubdiv_capi.h +++ b/intern/opensubdiv/opensubdiv_capi.h @@ -32,16 +32,19 @@ extern "C" { // Types declaration. struct OpenSubdiv_GLMesh; +struct OpenSubdiv_GLMeshFVarData; struct OpenSubdiv_TopologyRefinerDescr; typedef struct OpenSubdiv_GLMesh OpenSubdiv_GLMesh; #ifdef __cplusplus struct OpenSubdiv_GLMeshDescr; + typedef struct OpenSubdiv_GLMesh { int evaluator_type; OpenSubdiv_GLMeshDescr *descriptor; OpenSubdiv_TopologyRefinerDescr *topology_refiner; + OpenSubdiv_GLMeshFVarData *fvar_data; } OpenSubdiv_GLMesh; #endif @@ -66,8 +69,7 @@ enum { OpenSubdiv_GLMesh *openSubdiv_createOsdGLMeshFromTopologyRefiner( struct OpenSubdiv_TopologyRefinerDescr *topology_refiner, int evaluator_type, - int level, - int subdivide_uvs); + int level); void openSubdiv_deleteOsdGLMesh(OpenSubdiv_GLMesh *gl_mesh); unsigned int openSubdiv_getOsdGLMeshPatchIndexBuffer( @@ -129,8 +131,7 @@ void openSubdiv_evaluateVarying(OpenSubdiv_EvaluatorDescr *evaluator_descr, * * TODO(sergey): Some of the stuff could be initialized once for all meshes. */ -void openSubdiv_osdGLMeshDisplayPrepare(int use_osd_glsl, - int active_uv_index); +void openSubdiv_osdGLMeshDisplayPrepare(int use_osd_glsl); /* Draw specified patches. */ void openSubdiv_osdGLMeshDisplay(OpenSubdiv_GLMesh *gl_mesh, @@ -138,6 +139,10 @@ void openSubdiv_osdGLMeshDisplay(OpenSubdiv_GLMesh *gl_mesh, int start_patch, int num_patches); +void openSubdiv_osdGLAllocFVar(OpenSubdiv_GLMesh *gl_mesh, + const float *fvar_data); +void openSubdiv_osdGLDestroyFVar(OpenSubdiv_GLMesh *gl_mesh); + /* ** Utility functions ** */ int openSubdiv_supportGPUDisplay(void); int openSubdiv_getAvailableEvaluators(void); |