OpenSubdiv: Cleanup, don't use camel case for variable names
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 22 Jul 2016 10:40:53 +0000 (12:40 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Fri, 22 Jul 2016 12:56:15 +0000 (14:56 +0200)
intern/opensubdiv/opensubdiv_capi.cc
intern/opensubdiv/opensubdiv_gpu_capi.cc

index e04b23725b1485f20f304c8216caead76bb3f46c..20f69d76be408329ef5745ccba9774ea462551ed 100644 (file)
@@ -171,7 +171,7 @@ static void interpolate_fvar_data(OpenSubdiv::Far::TopologyRefiner& refiner,
        if (num_values_total <= 0) {
                return;
        }
-       OpenSubdiv::Far::PrimvarRefiner primvarRefiner(refiner);
+       OpenSubdiv::Far::PrimvarRefiner primvar_refiner(refiner);
        if (refiner.IsUniform()) {
                /* For uniform we only keep the highest level of refinement. */
                fvar_data.resize(num_values_max * fvar_width);
@@ -183,11 +183,11 @@ static void interpolate_fvar_data(OpenSubdiv::Far::TopologyRefiner& refiner,
                 */
                for (int level = 1; level < max_level; ++level) {
                        FVarVertex *dst = src + refiner.GetLevel(level-1).GetNumFVarValues(channel);
-                       primvarRefiner.InterpolateFaceVarying(level, src, dst, channel);
+                       primvar_refiner.InterpolateFaceVarying(level, src, dst, channel);
                        src = dst;
                }
                FVarVertex *dst = reinterpret_cast<FVarVertex *>(&fvar_data[0]);
-               primvarRefiner.InterpolateFaceVarying(max_level, src, dst, channel);
+               primvar_refiner.InterpolateFaceVarying(max_level, src, dst, channel);
        } else {
                /* For adaptive we keep all levels. */
                fvar_data.resize(num_values_total * fvar_width);
@@ -195,7 +195,7 @@ static void interpolate_fvar_data(OpenSubdiv::Far::TopologyRefiner& refiner,
                memcpy(src, &uvs[0], uvs.size() * sizeof(float));
                for (int level = 1; level <= max_level; ++level) {
                        FVarVertex *dst = src + refiner.GetLevel(level-1).GetNumFVarValues(channel);
-                       primvarRefiner.InterpolateFaceVarying(level, src, dst, channel);
+                       primvar_refiner.InterpolateFaceVarying(level, src, dst, channel);
                        src = dst;
         }
     }
index 84984e8bd7ecacc20e3e0d6d449d14c5c672cc49..8329062c4527c9309d60cb341c00eff37c9e4d66 100644 (file)
@@ -113,7 +113,7 @@ struct OpenSubdiv_GLMeshFVarData
        }
 
        void Create(const OpenSubdiv::Far::PatchTable *patch_table,
-                   int fvarWidth,
+                   int fvar_width,
                    const float *fvar_src_data)
        {
                Release();
@@ -121,11 +121,11 @@ struct OpenSubdiv_GLMeshFVarData
 
                // expand fvardata to per-patch array
                std::vector<float> data;
-               data.reserve(indices.size() * fvarWidth);
+               data.reserve(indices.size() * fvar_width);
 
                for (int fvert = 0; fvert < (int)indices.size(); ++fvert) {
-                       int index = indices[fvert] * fvarWidth;
-                       for (int i = 0; i < fvarWidth; ++i) {
+                       int index = indices[fvert] * fvar_width;
+                       for (int i = 0; i < fvar_width; ++i) {
                                data.push_back(fvar_src_data[index++]);
                        }
                }