Added class AbstractImage, inherited by Image and Texture

Former-commit-id: 16e5db4937a145ac244d6c70e4c74662622f86d9
This commit is contained in:
Lynix
2015-01-05 15:08:29 +01:00
parent 304b4d13cc
commit e3f7644831
7 changed files with 178 additions and 82 deletions

View File

@@ -0,0 +1,24 @@
// Copyright (C) 2015 Jérôme Leclercq
// This file is part of the "Nazara Engine - Utility module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#include <Nazara/Utility/AbstractImage.hpp>
#include <Nazara/Utility/PixelFormat.hpp>
#include <Nazara/Utility/Debug.hpp>
NzAbstractImage::~NzAbstractImage() = default;
nzUInt8 NzAbstractImage::GetBytesPerPixel() const
{
return NzPixelFormat::GetBytesPerPixel(GetFormat());
}
bool NzAbstractImage::IsCompressed() const
{
return NzPixelFormat::IsCompressed(GetFormat());
}
bool NzAbstractImage::IsCubemap() const
{
return GetType() == nzImageType_Cubemap;
}