Added class AbstractImage, inherited by Image and Texture
Former-commit-id: 16e5db4937a145ac244d6c70e4c74662622f86d9
This commit is contained in:
24
src/Nazara/Utility/AbstractImage.cpp
Normal file
24
src/Nazara/Utility/AbstractImage.cpp
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user