OpenSubdiv: Cleanup, don't use camel case for variable names
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
@@ -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++]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user