AuroraSim: non-power-of-two support.
This commit is contained in:
@@ -82,7 +82,8 @@ void LLPatchVertexArray::create(U32 surface_width, U32 patch_width, F32 meters_p
|
||||
surface_order += 1;
|
||||
}
|
||||
|
||||
if (power_of_two == (surface_width-1))
|
||||
if (power_of_two != (surface_width-1))
|
||||
surface_width = power_of_two + 1;
|
||||
{
|
||||
mSurfaceWidth = surface_width;
|
||||
|
||||
@@ -99,16 +100,11 @@ void LLPatchVertexArray::create(U32 surface_width, U32 patch_width, F32 meters_p
|
||||
power_of_two *= 2;
|
||||
patch_order += 1;
|
||||
}
|
||||
if (power_of_two == patch_width)
|
||||
{
|
||||
mPatchWidth = patch_width;
|
||||
mPatchOrder = patch_order;
|
||||
}
|
||||
else // patch_width is not a power of two...
|
||||
{
|
||||
mPatchWidth = 0;
|
||||
mPatchOrder = 0;
|
||||
}
|
||||
if (power_of_two != patch_width)
|
||||
patch_width = power_of_two;
|
||||
|
||||
mPatchWidth = patch_width;
|
||||
mPatchOrder = patch_order;
|
||||
}
|
||||
else // patch_width is not a factor of (surface_width - 1)...
|
||||
{
|
||||
@@ -116,12 +112,6 @@ void LLPatchVertexArray::create(U32 surface_width, U32 patch_width, F32 meters_p
|
||||
mPatchOrder = 0;
|
||||
}
|
||||
}
|
||||
else // surface_width is not a power of two...
|
||||
{
|
||||
mSurfaceWidth = 0;
|
||||
mPatchWidth = 0;
|
||||
mPatchOrder = 0;
|
||||
}
|
||||
|
||||
// PART 2 -- Allocate memory for the render level table
|
||||
if (mPatchWidth > 0)
|
||||
|
||||
Reference in New Issue
Block a user