Added Image

Added pixel format support
Added MemoryStream
Added Rect
Added ResourceLoader
Added generic loader (bmp, gif, hdr, jpg, jpeg, pic, png, psd, tga)
Added PCX loader
Added utility module initializer
Fixed Config.hpp include
Prerequesites.hpp now overwrites _WIN32_WINNT when defined
version is less than requiered version
Renderer's initialisation will implicitly initialize utility module
Removed RENDERER_SINGLETON option
Shaders are now resources
This commit is contained in:
Lynix
2012-05-21 21:54:13 +02:00
parent 47cdbbcdb0
commit 9b3f4e794a
51 changed files with 6845 additions and 147 deletions

View File

@@ -0,0 +1,71 @@
// Copyright (C) 2012 Jérôme Leclercq
// This file is part of the "Nazara Engine".
// For conditions of distribution and use, see copyright notice in Config.hpp
#include <Nazara/Core/Debug.hpp>
inline nzUInt8 NzPixelFormat::GetBPP(nzPixelFormat format)
{
switch (format)
{
case nzPixelFormat_Undefined:
return 0;
case nzPixelFormat_B8G8R8:
return 3;
case nzPixelFormat_B8G8R8A8:
return 4;
case nzPixelFormat_DXT1:
return 1;
case nzPixelFormat_DXT3:
return 2;
case nzPixelFormat_DXT5:
return 2;
case nzPixelFormat_L8:
return 1;
case nzPixelFormat_L8A8:
return 2;
case nzPixelFormat_R4G4A4A4:
return 2;
case nzPixelFormat_R5G5A5A1:
return 2;
case nzPixelFormat_R8:
return 1;
case nzPixelFormat_R8G8:
return 2;
case nzPixelFormat_R8G8B8:
return 3;
case nzPixelFormat_R8G8B8A8:
return 4;
}
return 0;
}
inline bool NzPixelFormat::IsCompressed(nzPixelFormat format)
{
switch (format)
{
case nzPixelFormat_DXT1:
case nzPixelFormat_DXT3:
case nzPixelFormat_DXT5:
return true;
default:
return false;
}
}
#include <Nazara/Core/DebugOff.hpp>