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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user