Cleanup: fix compiler warnings.
[blender.git] / intern / opensubdiv / opensubdiv_capi.h
index 0103952ec0c0ba1499f2b690eb8b437dd9bf6c16..92ebcee9e91b8422f1f1f70aa27ee3874c66cabd 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
  * as published by the Free Software Foundation; either version 2
  *
  * The Original Code is Copyright (C) 2013 Blender Foundation.
  * All rights reserved.
- *
- * Contributor(s): Sergey Sharybin
- *
- * ***** END GPL LICENSE BLOCK *****
  */
 
 #ifndef __OPENSUBDIV_CAPI_H__
@@ -32,16 +26,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 +63,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(
@@ -85,7 +81,7 @@ const struct OpenSubdiv_TopologyRefinerDescr *openSubdiv_getGLMeshTopologyRefine
         OpenSubdiv_GLMesh *gl_mesh);
 
 /* ** Initialize/Deinitialize global OpenGL drawing buffers/GLSL programs ** */
-void openSubdiv_osdGLDisplayInit(void);
+bool openSubdiv_osdGLDisplayInit(void);
 void openSubdiv_osdGLDisplayDeinit(void);
 
 /* ** Evaluator API ** */
@@ -138,10 +134,19 @@ void openSubdiv_osdGLMeshDisplay(OpenSubdiv_GLMesh *gl_mesh,
                                  int start_patch,
                                  int num_patches);
 
+void openSubdiv_osdGLAllocFVar(struct OpenSubdiv_TopologyRefinerDescr *topology_refiner,
+                               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);
+void openSubdiv_init(bool gpu_legacy_support);
 void openSubdiv_cleanup(void);
+bool openSubdiv_gpu_legacy_support(void);
+
+int openSubdiv_getVersionHex(void);
 
 #ifdef __cplusplus
 }