Added formats conversion

Functor, NonCopyable, Tuple are now parts of NazaraCore (NazaraCore no
longer needs NazaraUtility)
Added loadFormat image parameter (ask loader to load image in specific
format)
Fixed utility project building
It is now possible to convert, get validity or get name of pixel formats
Changed endianness macros' name
Removed useless NazaraEndianness macro
Removed unused files
This commit is contained in:
Lynix
2012-05-24 18:55:48 +02:00
parent 570e0a8070
commit b243d15c74
40 changed files with 1609 additions and 150 deletions

View File

@@ -35,12 +35,21 @@ enum nzImageType
struct NzImageParams
{
// GCC 4.7 je te veux
NzImageParams() :
loadFormat(nzPixelFormat_Undefined)
{
}
nzPixelFormat loadFormat;
bool IsValid() const
{
return true;
return loadFormat == nzPixelFormat_Undefined || NzPixelFormat::IsValid(loadFormat);
}
};
///TODO: Animations ?
///TODO: Filtres
///TODO: Mipmaps
@@ -55,6 +64,8 @@ class NAZARA_API NzImage : public NzResource, public NzResourceLoader<NzImage, N
NzImage(SharedImage* sharedImage);
~NzImage();
bool Convert(nzPixelFormat format);
bool Copy(const NzImage& source, const NzRectui& srcRect, const NzVector2ui& dstPos);
bool CopyToFace(nzCubemapFace face, const NzImage& source, const NzRectui& srcRect, const NzVector2ui& dstPos);