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:
@@ -111,8 +111,9 @@ NzHashDigest NzHashCRC32::End()
|
||||
{
|
||||
m_state->crc ^= 0xFFFFFFFF;
|
||||
|
||||
if (NazaraEndianness == nzEndianness_LittleEndian)
|
||||
NzByteSwap(&m_state->crc, sizeof(nzUInt32));
|
||||
#ifdef NAZARA_LITTLE_ENDIAN
|
||||
NzByteSwap(&m_state->crc, sizeof(nzUInt32));
|
||||
#endif
|
||||
|
||||
return NzHashDigest(GetHashName(), reinterpret_cast<nzUInt8*>(&m_state->crc), 4);
|
||||
}
|
||||
|
||||
@@ -52,8 +52,10 @@ NzHashDigest NzHashFletcher16::End()
|
||||
m_state->sum2 = (m_state->sum2 & 0xff) + (m_state->sum2 >> 8);
|
||||
|
||||
nzUInt32 fletcher = (m_state->sum2 << 8) | m_state->sum1;
|
||||
if (NazaraEndianness == nzEndianness_BigEndian)
|
||||
NzByteSwap(&fletcher, sizeof(nzUInt32));
|
||||
|
||||
#ifdef NAZARA_BIG_ENDIAN
|
||||
NzByteSwap(&fletcher, sizeof(nzUInt32));
|
||||
#endif
|
||||
|
||||
return NzHashDigest(GetHashName(), reinterpret_cast<nzUInt8*>(&fletcher), 2);
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ namespace
|
||||
nzUInt32 d = state->abcd[3];
|
||||
nzUInt32 t;
|
||||
|
||||
#ifdef NAZARA_ENDIANNESS_BIGENDIAN
|
||||
#ifdef NAZARA_BIG_ENDIAN
|
||||
/* Define storage only for big-endian CPUs. */
|
||||
nzUInt32 X[16];
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
#include <cstring>
|
||||
|
||||
/*** ENDIAN REVERSAL MACROS *******************************************/
|
||||
#ifdef NAZARA_ENDIANNESS_LITTLEENDIAN
|
||||
#ifdef NAZARA_LITTLE_ENDIAN
|
||||
|
||||
#define REVERSE32(w,x) { \
|
||||
nzUInt32 tmp = (w); \
|
||||
@@ -272,7 +272,7 @@ void SHA1_Init(SHA_CTX* context)
|
||||
context->s1.bitcount = 0;
|
||||
}
|
||||
|
||||
#ifdef NAZARA_ENDIANNESS_LITTLEENDIAN
|
||||
#ifdef NAZARA_LITTLE_ENDIAN
|
||||
|
||||
#define ROUND1_0_TO_15(a,b,c,d,e) \
|
||||
REVERSE32(*data++, W1[j]); \
|
||||
@@ -281,7 +281,7 @@ void SHA1_Init(SHA_CTX* context)
|
||||
(b) = ROTL32(30, (b)); \
|
||||
j++;
|
||||
|
||||
#else // NAZARA_ENDIANNESS_LITTLEENDIAN
|
||||
#else // NAZARA_LITTLE_ENDIAN
|
||||
|
||||
#define ROUND1_0_TO_15(a,b,c,d,e) \
|
||||
(e) = ROTL32(5, (a)) + Ch((b), (c), (d)) + (e) + \
|
||||
@@ -289,7 +289,7 @@ void SHA1_Init(SHA_CTX* context)
|
||||
(b) = ROTL32(30, (b)); \
|
||||
j++;
|
||||
|
||||
#endif // NAZARA_ENDIANNESS_LITTLEENDIAN
|
||||
#endif // NAZARA_LITTLE_ENDIAN
|
||||
|
||||
#define ROUND1_16_TO_19(a,b,c,d,e) \
|
||||
T1 = W1[(j+13)&0x0f] ^ W1[(j+8)&0x0f] ^ W1[(j+2)&0x0f] ^ W1[j&0x0f]; \
|
||||
@@ -512,7 +512,7 @@ void SHA1_End(SHA_CTX* context, nzUInt8* digest)
|
||||
}
|
||||
}
|
||||
/* Set the bit count: */
|
||||
#ifdef NAZARA_ENDIANNESS_LITTLEENDIAN
|
||||
#ifdef NAZARA_LITTLE_ENDIAN
|
||||
/* Convert FROM host byte order */
|
||||
REVERSE64(context->s1.bitcount,context->s1.bitcount);
|
||||
#endif
|
||||
@@ -523,7 +523,7 @@ void SHA1_End(SHA_CTX* context, nzUInt8* digest)
|
||||
SHA1_Internal_Transform(context, reinterpret_cast<nzUInt32*>(context->s1.buffer));
|
||||
|
||||
/* Save the hash data for output: */
|
||||
#ifdef NAZARA_ENDIANNESS_LITTLEENDIAN
|
||||
#ifdef NAZARA_LITTLE_ENDIAN
|
||||
{
|
||||
/* Convert TO host byte order */
|
||||
for (int j = 0; j < (SHA1_DIGEST_LENGTH >> 2); j++)
|
||||
@@ -551,7 +551,7 @@ void SHA256_Init(SHA_CTX* context)
|
||||
SHA256_Internal_Init(context, sha256_initial_hash_value);
|
||||
}
|
||||
|
||||
#ifdef NAZARA_ENDIANNESS_LITTLEENDIAN
|
||||
#ifdef NAZARA_LITTLE_ENDIAN
|
||||
|
||||
#define ROUND256_0_TO_15(a,b,c,d,e,f,g,h) \
|
||||
REVERSE32(*data++, W256[j]); \
|
||||
@@ -561,7 +561,7 @@ void SHA256_Init(SHA_CTX* context)
|
||||
(h) = T1 + Sigma0_256(a) + Maj((a), (b), (c)); \
|
||||
j++
|
||||
|
||||
#else // NAZARA_ENDIANNESS_LITTLEENDIAN
|
||||
#else // NAZARA_LITTLE_ENDIAN
|
||||
|
||||
#define ROUND256_0_TO_15(a,b,c,d,e,f,g,h) \
|
||||
T1 = (h) + Sigma1_256(e) + Ch((e), (f), (g)) + \
|
||||
@@ -570,7 +570,7 @@ void SHA256_Init(SHA_CTX* context)
|
||||
(h) = T1 + Sigma0_256(a) + Maj((a), (b), (c)); \
|
||||
j++
|
||||
|
||||
#endif // NAZARA_ENDIANNESS_LITTLEENDIAN
|
||||
#endif // NAZARA_LITTLE_ENDIAN
|
||||
|
||||
#define ROUND256(a,b,c,d,e,f,g,h) \
|
||||
s0 = W256[(j+1)&0x0f]; \
|
||||
@@ -693,7 +693,7 @@ void SHA256_Update(SHA_CTX* context, const nzUInt8 *data, std::size_t len)
|
||||
void SHA256_Internal_Last(SHA_CTX* context)
|
||||
{
|
||||
unsigned int usedspace = (context->s256.bitcount >> 3) % 64;
|
||||
#ifdef NAZARA_ENDIANNESS_LITTLEENDIAN
|
||||
#ifdef NAZARA_LITTLE_ENDIAN
|
||||
/* Convert FROM host byte order */
|
||||
REVERSE64(context->s256.bitcount,context->s256.bitcount);
|
||||
#endif
|
||||
@@ -744,7 +744,7 @@ void SHA256_End(SHA_CTX* context, nzUInt8* digest)
|
||||
SHA256_Internal_Last(context);
|
||||
|
||||
/* Save the hash data for output: */
|
||||
#ifdef NAZARA_ENDIANNESS_LITTLEENDIAN
|
||||
#ifdef NAZARA_LITTLE_ENDIAN
|
||||
{
|
||||
/* Convert TO host byte order */
|
||||
for (int j = 0; j < (SHA256_DIGEST_LENGTH >> 2); j++)
|
||||
@@ -786,7 +786,7 @@ void SHA224_End(SHA_CTX* context, nzUInt8* digest)
|
||||
SHA256_Internal_Last(context);
|
||||
|
||||
/* Save the hash data for output: */
|
||||
#ifdef NAZARA_ENDIANNESS_LITTLEENDIAN
|
||||
#ifdef NAZARA_LITTLE_ENDIAN
|
||||
{
|
||||
/* Convert TO host byte order */
|
||||
for (int j = 0; j < (SHA224_DIGEST_LENGTH >> 2); j++)
|
||||
@@ -816,7 +816,7 @@ void SHA512_Init(SHA_CTX* context)
|
||||
}
|
||||
|
||||
/* Unrolled SHA-512 round macros: */
|
||||
#ifdef NAZARA_ENDIANNESS_LITTLEENDIAN
|
||||
#ifdef NAZARA_LITTLE_ENDIAN
|
||||
|
||||
#define ROUND512_0_TO_15(a,b,c,d,e,f,g,h) \
|
||||
REVERSE64(*data++, W512[j]); \
|
||||
@@ -827,7 +827,7 @@ void SHA512_Init(SHA_CTX* context)
|
||||
j++
|
||||
|
||||
|
||||
#else // NAZARA_ENDIANNESS_LITTLEENDIAN
|
||||
#else // NAZARA_LITTLE_ENDIAN
|
||||
|
||||
#define ROUND512_0_TO_15(a,b,c,d,e,f,g,h) \
|
||||
T1 = (h) + Sigma1_512(e) + Ch((e), (f), (g)) + \
|
||||
@@ -836,7 +836,7 @@ void SHA512_Init(SHA_CTX* context)
|
||||
(h) = T1 + Sigma0_512(a) + Maj((a), (b), (c)); \
|
||||
j++
|
||||
|
||||
#endif // NAZARA_ENDIANNESS_LITTLEENDIAN
|
||||
#endif // NAZARA_LITTLE_ENDIAN
|
||||
|
||||
#define ROUND512(a,b,c,d,e,f,g,h) \
|
||||
s0 = W512[(j+1)&0x0f]; \
|
||||
@@ -958,7 +958,7 @@ void SHA512_Internal_Last(SHA_CTX* context)
|
||||
unsigned int usedspace;
|
||||
|
||||
usedspace = (context->s512.bitcount[0] >> 3) % 128;
|
||||
#ifdef NAZARA_ENDIANNESS_LITTLEENDIAN
|
||||
#ifdef NAZARA_LITTLE_ENDIAN
|
||||
/* Convert FROM host byte order */
|
||||
REVERSE64(context->s512.bitcount[0],context->s512.bitcount[0]);
|
||||
REVERSE64(context->s512.bitcount[1],context->s512.bitcount[1]);
|
||||
@@ -1011,7 +1011,7 @@ void SHA512_End(SHA_CTX* context, nzUInt8* digest)
|
||||
SHA512_Internal_Last(context);
|
||||
|
||||
/* Save the hash data for output: */
|
||||
#ifdef NAZARA_ENDIANNESS_LITTLEENDIAN
|
||||
#ifdef NAZARA_LITTLE_ENDIAN
|
||||
{
|
||||
/* Convert TO host byte order */
|
||||
for (int j = 0; j < (SHA512_DIGEST_LENGTH >> 3); j++)
|
||||
@@ -1051,7 +1051,7 @@ void SHA384_End(SHA_CTX* context, nzUInt8* digest)
|
||||
SHA512_Internal_Last(context);
|
||||
|
||||
/* Save the hash data for output: */
|
||||
#ifdef NAZARA_ENDIANNESS_LITTLEENDIAN
|
||||
#ifdef NAZARA_LITTLE_ENDIAN
|
||||
{
|
||||
/* Convert TO host byte order */
|
||||
for (int j = 0; j < (SHA384_DIGEST_LENGTH >> 3); j++)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#define NAZARA_DIRECTORYIMPL_HPP
|
||||
|
||||
#include <Nazara/Prerequesites.hpp>
|
||||
#include <Nazara/Utility/NonCopyable.hpp>
|
||||
#include <Nazara/Core/NonCopyable.hpp>
|
||||
#include <windows.h>
|
||||
|
||||
class NzDirectory;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#define NAZARA_DYNLIBIMPL_HPP
|
||||
|
||||
#include <Nazara/Core/DynLib.hpp>
|
||||
#include <Nazara/Utility/NonCopyable.hpp>
|
||||
#include <Nazara/Core/NonCopyable.hpp>
|
||||
#include <windows.h>
|
||||
|
||||
class NzString;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#include <Nazara/Prerequesites.hpp>
|
||||
#include <Nazara/Core/File.hpp>
|
||||
#include <Nazara/Utility/NonCopyable.hpp>
|
||||
#include <Nazara/Core/NonCopyable.hpp>
|
||||
#include <ctime>
|
||||
#include <windows.h>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include <Nazara/Core/Win32/ThreadImpl.hpp>
|
||||
#include <Nazara/Core/Error.hpp>
|
||||
#include <Nazara/Utility/Functor.hpp>
|
||||
#include <Nazara/Core/Functor.hpp>
|
||||
#include <process.h>
|
||||
#include <Nazara/Core/Debug.hpp>
|
||||
|
||||
|
||||
@@ -383,10 +383,6 @@ bool NzOpenGL::Initialize()
|
||||
NzContextParameters::defaultMajorVersion = openGLversion/100;
|
||||
NzContextParameters::defaultMinorVersion = (openGLversion%100)/10;
|
||||
|
||||
/*
|
||||
NzContextParameters::defaultMajorVersion = std::min(openGLversion/100, 2U);
|
||||
NzContextParameters::defaultMinorVersion = std::min((openGLversion%100)/10, 1U);
|
||||
*/
|
||||
if (!NzContext::InitializeReference())
|
||||
{
|
||||
NazaraError("Failed to initialize reference context");
|
||||
|
||||
@@ -36,6 +36,79 @@ NzImage::~NzImage()
|
||||
ReleaseImage();
|
||||
}
|
||||
|
||||
bool NzImage::Convert(nzPixelFormat format)
|
||||
{
|
||||
if (format == m_sharedImage->format)
|
||||
return true;
|
||||
|
||||
#if NAZARA_UTILITY_SAFE
|
||||
if (!IsValid())
|
||||
{
|
||||
NazaraError("Image must be valid");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!NzPixelFormat::IsValid(format))
|
||||
{
|
||||
NazaraError("Invalid pixel format");
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
EnsureOwnership();
|
||||
|
||||
unsigned int depth = (IsCubemap()) ? 6 : m_sharedImage->depth;
|
||||
unsigned int pixelsPerFace = m_sharedImage->width*m_sharedImage->height;
|
||||
|
||||
nzUInt8* buffer;
|
||||
if (depth > 1)
|
||||
{
|
||||
// Les images 3D sont un empilement d'images 2D
|
||||
// Quant aux cubemaps, ils sont stockés côte à côte, ce qui revient au même
|
||||
buffer = new nzUInt8[pixelsPerFace*depth*NzPixelFormat::GetBPP(format)];
|
||||
|
||||
nzUInt8* ptr = buffer;
|
||||
nzUInt8* pixels = m_sharedImage->pixels;
|
||||
unsigned int srcStride = pixelsPerFace * NzPixelFormat::GetBPP(m_sharedImage->format);
|
||||
unsigned int dstStride = pixelsPerFace * NzPixelFormat::GetBPP(format);
|
||||
|
||||
for (unsigned int i = 0; i < depth; ++i)
|
||||
{
|
||||
if (!NzPixelFormat::Convert(m_sharedImage->format, format, pixels, &pixels[srcStride], ptr))
|
||||
{
|
||||
NazaraError("Failed to convert image");
|
||||
delete[] buffer;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
pixels += srcStride;
|
||||
ptr += dstStride;
|
||||
}
|
||||
|
||||
delete[] buffer;
|
||||
}
|
||||
else
|
||||
{
|
||||
buffer = new nzUInt8[pixelsPerFace*NzPixelFormat::GetBPP(format)];
|
||||
|
||||
if (!NzPixelFormat::Convert(m_sharedImage->format, format, m_sharedImage->pixels, &m_sharedImage->pixels[pixelsPerFace*NzPixelFormat::GetBPP(m_sharedImage->format)], buffer))
|
||||
{
|
||||
NazaraError("Failed to convert image");
|
||||
delete[] buffer;
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
delete[] m_sharedImage->pixels;
|
||||
|
||||
m_sharedImage->format = format;
|
||||
m_sharedImage->pixels = buffer;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool NzImage::Copy(const NzImage& source, const NzRectui& srcRect, const NzVector2ui& dstPos)
|
||||
{
|
||||
#if NAZARA_UTILITY_SAFE
|
||||
@@ -78,6 +151,14 @@ bool NzImage::Create(nzImageType type, nzPixelFormat format, unsigned int width,
|
||||
{
|
||||
ReleaseImage();
|
||||
|
||||
#if NAZARA_UTILITY_SAFE
|
||||
if (!NzPixelFormat::IsValid(format))
|
||||
{
|
||||
NazaraError("Invalid pixel format");
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
unsigned int size = width*height*depth*NzPixelFormat::GetBPP(format);
|
||||
if (size == 0)
|
||||
return true;
|
||||
@@ -131,7 +212,19 @@ bool NzImage::Create(nzImageType type, nzPixelFormat format, unsigned int width,
|
||||
size *= 6; // Les cubemaps ont six faces
|
||||
#endif
|
||||
|
||||
m_sharedImage = new SharedImage(1, type, format, new nzUInt8[size], width, height, depth);
|
||||
// Cette allocation est protégée car sa taille dépend directement de paramètres utilisateurs
|
||||
nzUInt8* buffer;
|
||||
try
|
||||
{
|
||||
buffer = new nzUInt8[size];
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
NazaraError("Failed to allocate image buffer (" + NzString(e.what()) + ')');
|
||||
return false;
|
||||
}
|
||||
|
||||
m_sharedImage = new SharedImage(1, type, format, buffer, width, height, depth);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -472,4 +565,4 @@ void NzImage::ReleaseImage()
|
||||
m_sharedImage = &emptyImage;
|
||||
}
|
||||
|
||||
NzImage::SharedImage NzImage::emptyImage(0, nzImageType_2D, nzPixelFormat_R8G8B8, nullptr, 0, 0, 0);
|
||||
NzImage::SharedImage NzImage::emptyImage(0, nzImageType_2D, nzPixelFormat_Undefined, nullptr, 0, 0, 0);
|
||||
|
||||
@@ -74,7 +74,7 @@ namespace
|
||||
return false;
|
||||
}
|
||||
|
||||
#if NAZARA_ENDIANNESS_BIGENDIAN
|
||||
#if NAZARA_BIG_ENDIAN
|
||||
// Les fichiers PCX sont en little endian
|
||||
NzByteSwap(&header.xmin, sizeof(nzUInt16));
|
||||
NzByteSwap(&header.ymin, sizeof(nzUInt16));
|
||||
@@ -93,7 +93,7 @@ namespace
|
||||
unsigned int width = header.xmax - header.xmin+1;
|
||||
unsigned int height = header.ymax - header.ymin+1;
|
||||
|
||||
if (!resource->Create(nzImageType_2D, nzPixelFormat_R8G8B8, width, height))
|
||||
if (!resource->Create(nzImageType_2D, nzPixelFormat_RGB8, width, height))
|
||||
{
|
||||
NazaraError("Failed to create image");
|
||||
return false;
|
||||
@@ -343,6 +343,9 @@ namespace
|
||||
return false;
|
||||
}
|
||||
|
||||
if (parameters.loadFormat != nzPixelFormat_Undefined)
|
||||
resource->Convert(parameters.loadFormat);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -63,15 +63,44 @@ namespace
|
||||
{
|
||||
NazaraUnused(parameters);
|
||||
|
||||
static nzPixelFormat format[4] = {
|
||||
static nzPixelFormat formats[4] = {
|
||||
nzPixelFormat_L8,
|
||||
nzPixelFormat_L8A8,
|
||||
nzPixelFormat_R8G8B8,
|
||||
nzPixelFormat_R8G8B8A8
|
||||
nzPixelFormat_LA8,
|
||||
nzPixelFormat_RGB8,
|
||||
nzPixelFormat_RGBA8
|
||||
};
|
||||
|
||||
nzPixelFormat format;
|
||||
int stbiFormat;
|
||||
switch (parameters.loadFormat)
|
||||
{
|
||||
case nzPixelFormat_L8:
|
||||
format = nzPixelFormat_L8;
|
||||
stbiFormat = STBI_grey;
|
||||
break;
|
||||
|
||||
case nzPixelFormat_LA8:
|
||||
format = nzPixelFormat_LA8;
|
||||
stbiFormat = STBI_grey_alpha;
|
||||
break;
|
||||
|
||||
case nzPixelFormat_RGB8:
|
||||
format = nzPixelFormat_RGB8;
|
||||
stbiFormat = STBI_rgb;
|
||||
break;
|
||||
|
||||
case nzPixelFormat_RGBA8:
|
||||
format = nzPixelFormat_RGBA8;
|
||||
stbiFormat = STBI_rgb_alpha;
|
||||
break;
|
||||
|
||||
default:
|
||||
format = nzPixelFormat_Undefined;
|
||||
stbiFormat = STBI_default;
|
||||
}
|
||||
|
||||
int width, height, bpp;
|
||||
nzUInt8* ptr = stbi_load_from_callbacks(&callbacks, &stream, &width, &height, &bpp, STBI_default);
|
||||
nzUInt8* ptr = stbi_load_from_callbacks(&callbacks, &stream, &width, &height, &bpp, stbiFormat);
|
||||
|
||||
if (!ptr)
|
||||
{
|
||||
@@ -79,7 +108,10 @@ namespace
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!resource->Create(nzImageType_2D, format[bpp-1], width, height))
|
||||
if (format == nzPixelFormat_Undefined)
|
||||
format = formats[bpp-1];
|
||||
|
||||
if (!resource->Create(nzImageType_2D, format, width, height))
|
||||
{
|
||||
NazaraError("Failed to create image");
|
||||
stbi_image_free(ptr);
|
||||
@@ -90,6 +122,9 @@ namespace
|
||||
resource->Update(ptr);
|
||||
stbi_image_free(ptr);
|
||||
|
||||
if (stbiFormat == STBI_default && parameters.loadFormat != nzPixelFormat_Undefined)
|
||||
resource->Convert(parameters.loadFormat);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
1161
src/Nazara/Utility/PixelFormat.cpp
Normal file
1161
src/Nazara/Utility/PixelFormat.cpp
Normal file
File diff suppressed because it is too large
Load Diff
@@ -7,6 +7,7 @@
|
||||
#include <Nazara/Utility/Config.hpp>
|
||||
#include <Nazara/Utility/Loaders/PCX.hpp>
|
||||
#include <Nazara/Utility/Loaders/STB.hpp>
|
||||
#include <Nazara/Utility/PixelFormat.hpp>
|
||||
#include <Nazara/Utility/Debug.hpp>
|
||||
|
||||
NzUtility::NzUtility()
|
||||
@@ -29,6 +30,12 @@ bool NzUtility::Initialize()
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!NzPixelFormat::Initialize())
|
||||
{
|
||||
NazaraError("Failed to initialize pixel format");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Loaders spécialisés
|
||||
NzLoaders_PCX_Register(); // Loader de fichiers .PCX (1, 4, 8, 24)
|
||||
|
||||
@@ -53,6 +60,8 @@ void NzUtility::Uninitialize()
|
||||
NzLoaders_STB_Unregister();
|
||||
NzLoaders_PCX_Unregister();
|
||||
|
||||
NzPixelFormat::Uninitialize();
|
||||
|
||||
s_initialized = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
#ifndef NAZARA_WINDOWIMPL_HPP
|
||||
#define NAZARA_WINDOWIMPL_HPP
|
||||
|
||||
#include <Nazara/Core/NonCopyable.hpp>
|
||||
#include <Nazara/Core/String.hpp>
|
||||
#include <Nazara/Math/Vector2.hpp>
|
||||
#include <Nazara/Utility/Config.hpp>
|
||||
#include <Nazara/Utility/Keyboard.hpp>
|
||||
#include <Nazara/Utility/Mouse.hpp>
|
||||
#include <Nazara/Utility/NonCopyable.hpp>
|
||||
#include <Nazara/Utility/VideoMode.hpp>
|
||||
#include <Nazara/Utility/Window.hpp>
|
||||
#include <windows.h>
|
||||
|
||||
Reference in New Issue
Block a user