mirror of
https://github.com/microsoft/DirectXTex.git
synced 2025-07-09 19:50:13 +02:00
minor code review
This commit is contained in:
parent
37bd7113de
commit
fddcbb0fc8
@ -28,7 +28,7 @@ namespace
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
size_t _CountMips(_In_ size_t width, _In_ size_t height)
|
size_t CountMips(_In_ size_t width, _In_ size_t height)
|
||||||
{
|
{
|
||||||
size_t mipLevels = 1;
|
size_t mipLevels = 1;
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ namespace
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
size_t _CountMips3D(_In_ size_t width, _In_ size_t height, _In_ size_t depth)
|
size_t CountMips3D(_In_ size_t width, _In_ size_t height, _In_ size_t depth)
|
||||||
{
|
{
|
||||||
size_t mipLevels = 1;
|
size_t mipLevels = 1;
|
||||||
|
|
||||||
@ -129,13 +129,13 @@ namespace DirectX
|
|||||||
{
|
{
|
||||||
if (mipLevels > 1)
|
if (mipLevels > 1)
|
||||||
{
|
{
|
||||||
size_t maxMips = _CountMips(width, height);
|
size_t maxMips = CountMips(width, height);
|
||||||
if (mipLevels > maxMips)
|
if (mipLevels > maxMips)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if (mipLevels == 0)
|
else if (mipLevels == 0)
|
||||||
{
|
{
|
||||||
mipLevels = _CountMips(width, height);
|
mipLevels = CountMips(width, height);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -148,13 +148,13 @@ namespace DirectX
|
|||||||
{
|
{
|
||||||
if (mipLevels > 1)
|
if (mipLevels > 1)
|
||||||
{
|
{
|
||||||
size_t maxMips = _CountMips3D(width, height, depth);
|
size_t maxMips = CountMips3D(width, height, depth);
|
||||||
if (mipLevels > maxMips)
|
if (mipLevels > maxMips)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if (mipLevels == 0)
|
else if (mipLevels == 0)
|
||||||
{
|
{
|
||||||
mipLevels = _CountMips3D(width, height, depth);
|
mipLevels = CountMips3D(width, height, depth);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio 2017
|
# Visual Studio 2015
|
||||||
VisualStudioVersion = 14.0.22609.0
|
VisualStudioVersion = 14.0.22609.0
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DirectXTex", "DirectXTex\DirectXTex_Windows10_2015.vcxproj", "{FB3F52B5-BFE8-43FD-836F-363735DAB738}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DirectXTex", "DirectXTex\DirectXTex_Windows10_2015.vcxproj", "{FB3F52B5-BFE8-43FD-836F-363735DAB738}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user