This commit is contained in:
SirLynix 2023-03-10 13:25:37 +01:00
parent 75b6ba8dab
commit b28a0a8748
3 changed files with 11 additions and 11 deletions

View File

@ -63,15 +63,15 @@ namespace Nz
Node& Scale(float scale); Node& Scale(float scale);
Node& Scale(float scaleX, float scaleY, float scaleZ = 1.f); Node& Scale(float scaleX, float scaleY, float scaleZ = 1.f);
void SetInheritPosition(bool inheritPosition);
void SetInheritRotation(bool inheritRotation); void SetInheritRotation(bool inheritRotation);
void SetInheritScale(bool inheritScale); void SetInheritScale(bool inheritScale);
void SetInheritPosition(bool inheritPosition); void SetInitialPosition(const Vector3f& translation);
void SetInitialPosition(float translationX, float translationXY, float translationZ = 0.f);
void SetInitialRotation(const Quaternionf& quat); void SetInitialRotation(const Quaternionf& quat);
void SetInitialScale(const Vector3f& scale); void SetInitialScale(const Vector3f& scale);
void SetInitialScale(float scale); void SetInitialScale(float scale);
void SetInitialScale(float scaleX, float scaleY, float scaleZ = 1.f); void SetInitialScale(float scaleX, float scaleY, float scaleZ = 1.f);
void SetInitialPosition(const Vector3f& translation);
void SetInitialPosition(float translationX, float translationXY, float translationZ = 0.f);
void SetParent(const Node* node = nullptr, bool keepDerived = false); void SetParent(const Node* node = nullptr, bool keepDerived = false);
void SetParent(const Node& node, bool keepDerived = false); void SetParent(const Node& node, bool keepDerived = false);
void SetPosition(const Vector3f& translation, CoordSys coordSys = CoordSys::Local); void SetPosition(const Vector3f& translation, CoordSys coordSys = CoordSys::Local);

View File

@ -17,12 +17,12 @@ namespace Nz
std::filesystem::file_status status = physicalEntry.status(); std::filesystem::file_status status = physicalEntry.status();
VirtualDirectory::Entry entry; VirtualDirectory::Entry entry;
if (std::filesystem::is_regular_file(status)) if (physicalEntry.is_regular_file())
{ {
if (!callback(filename, VirtualDirectory::FileEntry{ std::make_shared<File>(physicalEntry.path(), m_fileOpenMode) })) if (!callback(filename, VirtualDirectory::FileEntry{ std::make_shared<File>(physicalEntry.path(), m_fileOpenMode) }))
return; return;
} }
else if (std::filesystem::is_directory(status)) else if (physicalEntry.is_directory())
{ {
VirtualDirectoryPtr virtualDir = std::make_shared<VirtualDirectory>(std::make_shared<VirtualDirectoryFilesystemResolver>(physicalEntry.path()), parent); VirtualDirectoryPtr virtualDir = std::make_shared<VirtualDirectory>(std::make_shared<VirtualDirectoryFilesystemResolver>(physicalEntry.path()), parent);
if (!callback(filename, VirtualDirectory::DirectoryEntry{ { std::move(virtualDir) } })) if (!callback(filename, VirtualDirectory::DirectoryEntry{ { std::move(virtualDir) } }))

View File

@ -26,28 +26,28 @@ namespace Nz
switch (textureInfo.type) switch (textureInfo.type)
{ {
case ImageType::E2D: case ImageType::E2D:
m_texture.TexStorage2D(GL::TextureTarget::Target2D, textureInfo.levelCount, format->internalFormat, textureInfo.width, textureInfo.height); m_texture.TexStorage2D(GL::TextureTarget::Target2D, m_textureInfo.levelCount, format->internalFormat, textureInfo.width, textureInfo.height);
break; break;
case ImageType::E2D_Array: case ImageType::E2D_Array:
m_texture.TexStorage3D(GL::TextureTarget::Target2D_Array, textureInfo.levelCount, format->internalFormat, textureInfo.width, textureInfo.height, textureInfo.layerCount); m_texture.TexStorage3D(GL::TextureTarget::Target2D_Array, m_textureInfo.levelCount, format->internalFormat, textureInfo.width, textureInfo.height, textureInfo.layerCount);
break; break;
case ImageType::E3D: case ImageType::E3D:
m_texture.TexStorage3D(GL::TextureTarget::Target3D, textureInfo.levelCount, format->internalFormat, textureInfo.width, textureInfo.height, textureInfo.depth); m_texture.TexStorage3D(GL::TextureTarget::Target3D, m_textureInfo.levelCount, format->internalFormat, textureInfo.width, textureInfo.height, textureInfo.depth);
break; break;
case ImageType::Cubemap: case ImageType::Cubemap:
m_texture.TexStorage2D(GL::TextureTarget::Cubemap, textureInfo.levelCount, format->internalFormat, textureInfo.width, textureInfo.height); m_texture.TexStorage2D(GL::TextureTarget::Cubemap, m_textureInfo.levelCount, format->internalFormat, textureInfo.width, textureInfo.height);
break; break;
// OpenGL ES doesn't support 1D textures, use 2D textures with a height of 1 instead // OpenGL ES doesn't support 1D textures, use 2D textures with a height of 1 instead
case ImageType::E1D: case ImageType::E1D:
m_texture.TexStorage2D(GL::TextureTarget::Target2D, textureInfo.levelCount, format->internalFormat, textureInfo.width, 1); m_texture.TexStorage2D(GL::TextureTarget::Target2D, m_textureInfo.levelCount, format->internalFormat, textureInfo.width, 1);
break; break;
case ImageType::E1D_Array: case ImageType::E1D_Array:
m_texture.TexStorage2D(GL::TextureTarget::Target2D, textureInfo.levelCount, format->internalFormat, textureInfo.width, textureInfo.layerCount); m_texture.TexStorage2D(GL::TextureTarget::Target2D, m_textureInfo.levelCount, format->internalFormat, textureInfo.width, textureInfo.layerCount);
break; break;
} }