Changed all the files encoding to UTF-8
Named modules in licence informations
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
/*#include <Nazara/Core/ByteArray.hpp>
|
||||
/*
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Core/ByteArray.hpp>
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
#include <Nazara/Core/Debug.hpp>
|
||||
@@ -12,7 +17,7 @@ inline unsigned int nzPow2(unsigned int n)
|
||||
|
||||
return x;
|
||||
}
|
||||
// Cet algorithme est inspiré de la documentation de Qt
|
||||
// Cet algorithme est inspiré de la documentation de Qt
|
||||
inline unsigned int nzGetNewSize(unsigned int newSize)
|
||||
{
|
||||
if (newSize < 20)
|
||||
@@ -146,7 +151,7 @@ NzByteArray& NzByteArray::Insert(int pos, const nzUInt8* buffer, unsigned int bu
|
||||
|
||||
unsigned int start = std::min(static_cast<unsigned int>(pos), m_sharedArray->size);
|
||||
|
||||
// Si le buffer est déjà suffisamment grand
|
||||
// Si le buffer est déjà suffisamment grand
|
||||
if (m_sharedArray->capacity >= m_sharedArray->size + bufferLength)
|
||||
{
|
||||
EnsureOwnership();
|
||||
@@ -195,7 +200,7 @@ NzByteArray& NzByteArray::Insert(int pos, const NzByteArray& byteArray)
|
||||
|
||||
unsigned int start = std::min(static_cast<unsigned int>(pos), m_sharedArray->size);
|
||||
|
||||
// Si le buffer est déjà suffisamment grand
|
||||
// Si le buffer est déjà suffisamment grand
|
||||
if (m_sharedArray->capacity >= m_sharedArray->size + string.m_sharedArray->size)
|
||||
{
|
||||
EnsureOwnership();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Core/Clock.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Core/Color.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Core/ConditionVariable.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 AUTHORS
|
||||
// This file is part of the "Nazara Engine".
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Core/Core.hpp>
|
||||
@@ -11,11 +11,11 @@
|
||||
bool NzCore::Initialize()
|
||||
{
|
||||
if (s_moduleReferenceCouter++ != 0)
|
||||
return true; // Déjà initialisé
|
||||
return true; // Déjà initialisé
|
||||
|
||||
// Initialisation du module
|
||||
// Le noyau de Nazara n'a pour l'instant aucun besoin d'initialisation, mais dans le futur il est très probable que ce soit le cas.
|
||||
// Donc en prévision, tous les modules initialisent le noyau
|
||||
// Le noyau de Nazara n'a pour l'instant aucun besoin d'initialisation, mais dans le futur il est très probable que ce soit le cas.
|
||||
// Donc en prévision, tous les modules initialisent le noyau
|
||||
|
||||
NazaraNotice("Initialized: Core");
|
||||
|
||||
@@ -30,9 +30,9 @@ bool NzCore::IsInitialized()
|
||||
void NzCore::Uninitialize()
|
||||
{
|
||||
if (--s_moduleReferenceCouter != 0)
|
||||
return; // Encore utilisé
|
||||
return; // Encore utilisé
|
||||
|
||||
// Libération du module
|
||||
// Libération du module
|
||||
NazaraNotice("Uninitialized: Core");
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Core/Config.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Core/Debug/MemoryLeakTracker.hpp>
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Core/Directory.hpp>
|
||||
#include <Nazara/Core/Config.hpp>
|
||||
#include <Nazara/Core/Error.hpp>
|
||||
#include <Nazara/Core/File.hpp>
|
||||
//#include <Nazara/ThreadLocalVar.h>
|
||||
//#include <Nazara/Core/ThreadLocal.hpp>
|
||||
|
||||
#if defined(NAZARA_PLATFORM_WINDOWS)
|
||||
#include <Nazara/Core/Win32/DirectoryImpl.hpp>
|
||||
@@ -21,7 +21,7 @@
|
||||
namespace
|
||||
{
|
||||
NzString currentPath(NzDirectoryImpl::GetCurrent());
|
||||
//static ThreadLocalVar<NzString> currentPath(NzDirectoryImpl::GetCurrent());
|
||||
//static ThreadLocal<NzString> currentPath(NzDirectoryImpl::GetCurrent());
|
||||
}
|
||||
|
||||
NzDirectory::NzDirectory() :
|
||||
@@ -247,7 +247,7 @@ bool NzDirectory::Create(const NzString& dirPath, bool recursive)
|
||||
return false;
|
||||
|
||||
#ifdef NAZARA_PLATFORM_WINDOWS
|
||||
// Contrairement au disque (Ex: "C:"), le chemin réseau n'est pas considéré comme un dossier (Ex: "\\Laptop")
|
||||
// Contrairement au disque (Ex: "C:"), le chemin réseau n'est pas considéré comme un dossier (Ex: "\\Laptop")
|
||||
if (path.Match("\\\\*"))
|
||||
{
|
||||
foundPos = path.Find('\\', 2);
|
||||
@@ -304,7 +304,7 @@ bool NzDirectory::Remove(const NzString& dirPath, bool emptyDirectory)
|
||||
{
|
||||
NzDirectory dir(dirPath);
|
||||
if (!dir.Open())
|
||||
return NzDirectoryImpl::Remove(dirPath); // Si on n'arrive pas à ouvrir le dossier, on tente de le supprimer
|
||||
return NzDirectoryImpl::Remove(dirPath); // Si on n'arrive pas à ouvrir le dossier, on tente de le supprimer
|
||||
|
||||
while (dir.NextResult(true))
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Core/DynLib.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Core/Error.hpp>
|
||||
@@ -52,7 +52,7 @@ NzString NzGetLastSystemError(unsigned int code)
|
||||
NzString error(NzString::Unicode(buffer));
|
||||
LocalFree(buffer);
|
||||
|
||||
error.Trim(); // Pour une raison inconnue, Windows met deux-trois retours à la ligne après le message
|
||||
error.Trim(); // Pour une raison inconnue, Windows met deux-trois retours à la ligne après le message
|
||||
|
||||
return error;
|
||||
#elif defined(NAZARA_PLATFORM_POSIX)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Core/File.hpp>
|
||||
@@ -207,7 +207,7 @@ NzString NzFile::GetLine(unsigned int lineSize)
|
||||
#endif
|
||||
|
||||
NzString line;
|
||||
if (lineSize == 0) // Taille maximale indéterminée
|
||||
if (lineSize == 0) // Taille maximale indéterminée
|
||||
{
|
||||
while (!m_impl->EndOfFile())
|
||||
{
|
||||
@@ -293,7 +293,7 @@ std::size_t NzFile::Read(void* buffer, std::size_t size)
|
||||
return m_impl->Read(buffer, size);
|
||||
else
|
||||
{
|
||||
// Si nous ne devons rien lire, nous avançons simplement
|
||||
// Si nous ne devons rien lire, nous avançons simplement
|
||||
nzUInt64 currentPos = m_impl->GetCursorPos();
|
||||
|
||||
m_impl->SetCursorPos(NzFile::AtCurrent, size);
|
||||
@@ -464,7 +464,7 @@ bool NzFile::Write(const NzString& string)
|
||||
#if defined(NAZARA_PLATFORM_WINDOWS)
|
||||
temp.Replace("\n", "\r\n");
|
||||
#elif defined(NAZARA_PLATFORM_LINUX)
|
||||
// Rien à faire
|
||||
// Rien à faire
|
||||
#elif defined(NAZARA_PLATFORM_MACOS)
|
||||
temp.Replace('\n', '\r');
|
||||
#else
|
||||
@@ -554,7 +554,7 @@ NzString NzFile::AbsolutePath(const NzString& filePath)
|
||||
base = "\\\\";
|
||||
start = 2;
|
||||
}
|
||||
else if (path.StartsWith('\\')) // Spécial : '\' fait référence au disque racine
|
||||
else if (path.StartsWith('\\')) // Spécial : '\' fait référence au disque racine
|
||||
{
|
||||
NzString drive = NzDirectory::GetCurrent().SubstrTo('\\');
|
||||
NzString end = path.Substr(1, -1);
|
||||
@@ -594,7 +594,7 @@ NzString NzFile::AbsolutePath(const NzString& filePath)
|
||||
sep.erase(sep.begin() + i--);
|
||||
else if (sep[i] == "..")
|
||||
{
|
||||
if (i > start) // Si nous ne sommes pas dans la partie protégée
|
||||
if (i > start) // Si nous ne sommes pas dans la partie protégée
|
||||
sep.erase(sep.begin() + i--);
|
||||
|
||||
sep.erase(sep.begin() + i--);
|
||||
@@ -605,7 +605,7 @@ NzString NzFile::AbsolutePath(const NzString& filePath)
|
||||
|
||||
pathLen += sep.size()-1;
|
||||
|
||||
///FIXME: Le destructeur de NzStringStream provoque un bug lors de la libération de son vector
|
||||
///FIXME: Le destructeur de NzStringStream provoque un bug lors de la libération de son vector
|
||||
|
||||
//NzStringStream stream(base);
|
||||
NzString stream;
|
||||
@@ -714,7 +714,7 @@ bool NzFile::IsAbsolute(const NzString& path)
|
||||
return true;
|
||||
else if (path.Match("\\\\*"))
|
||||
return true;
|
||||
else if (wpath.StartsWith('\\')) // Spécial : '\' fait référence au disque racine
|
||||
else if (wpath.StartsWith('\\')) // Spécial : '\' fait référence au disque racine
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Core/Hash.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Core/Hash/CRC32.hpp>
|
||||
@@ -70,7 +70,7 @@ NzHashCRC32::NzHashCRC32(nzUInt32 polynomial)
|
||||
m_state = new NzHashCRC32_state;
|
||||
|
||||
if (polynomial == 0x04c11db7)
|
||||
m_state->table = crc32_table; // Table précalculée (Bien plus rapide)
|
||||
m_state->table = crc32_table; // Table précalculée (Bien plus rapide)
|
||||
else
|
||||
{
|
||||
nzUInt32* table = new nzUInt32[256];
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Core/Hash/Fletcher16.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Core/Hash/SHA1.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Core/Hash/SHA224.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Core/Hash/SHA256.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Core/Hash/SHA384.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Core/Hash/SHA512.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Core/HashDigest.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Core/Hashable.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Core/InputStream.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Core/LockGuard.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Core/Log.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Core/MemoryStream.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Core/Mutex.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Core/Resource.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Core/Semaphore.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Core/String.hpp>
|
||||
@@ -19,13 +19,13 @@ inline unsigned int nzPow2(unsigned int n)
|
||||
{
|
||||
unsigned int x = 1;
|
||||
|
||||
// Tant que x est plus petit que n, on décale ses bits vers la gauche, ce qui revient à multiplier par deux
|
||||
// Tant que x est plus petit que n, on décale ses bits vers la gauche, ce qui revient à multiplier par deux
|
||||
while(x <= n)
|
||||
x <<= 1;
|
||||
|
||||
return x;
|
||||
}
|
||||
// Cet algorithme est inspiré de la documentation de Qt
|
||||
// Cet algorithme est inspiré de la documentation de Qt
|
||||
inline unsigned int nzGetNewSize(unsigned int newSize)
|
||||
{
|
||||
if (newSize < 20)
|
||||
@@ -1174,7 +1174,7 @@ unsigned int NzString::FindLast(const char* string, int start, nzUInt32 flags) c
|
||||
if (flags & HandleUtf8)
|
||||
{
|
||||
if (utf8::internal::is_trail(*ptr))
|
||||
utf8::unchecked::prior(ptr); // On s'assure d'avoir un pointeur vers le début d'un caractère
|
||||
utf8::unchecked::prior(ptr); // On s'assure d'avoir un pointeur vers le début d'un caractère
|
||||
|
||||
utf8::unchecked::iterator<const char*> it(ptr);
|
||||
const char* t = string;
|
||||
@@ -1282,9 +1282,9 @@ unsigned int NzString::FindLast(const NzString& string, int start, nzUInt32 flag
|
||||
{
|
||||
if (flags & HandleUtf8)
|
||||
{
|
||||
///Algo 1.FindLast#3 (Itérateur non-adapté)
|
||||
///Algo 1.FindLast#3 (Itérateur non-adapté)
|
||||
if (utf8::internal::is_trail(*ptr))
|
||||
utf8::unchecked::prior(ptr); // On s'assure d'avoir un pointeur vers le début d'un caractère
|
||||
utf8::unchecked::prior(ptr); // On s'assure d'avoir un pointeur vers le début d'un caractère
|
||||
|
||||
utf8::unchecked::iterator<const char*> it(ptr);
|
||||
const char* t = string.m_sharedString->string;
|
||||
@@ -1559,13 +1559,13 @@ unsigned int NzString::FindLastWord(const char* string, int start, nzUInt32 flag
|
||||
if (flags & HandleUtf8)
|
||||
{
|
||||
if (utf8::internal::is_trail(*ptr))
|
||||
utf8::unchecked::prior(ptr); // On s'assure d'avoir un pointeur vers le début d'un caractère
|
||||
utf8::unchecked::prior(ptr); // On s'assure d'avoir un pointeur vers le début d'un caractère
|
||||
|
||||
utf8::unchecked::iterator<const char*> it(ptr);
|
||||
|
||||
if (flags & CaseInsensitive)
|
||||
{
|
||||
const char* t = string; // utf8(::unchecked)::next affecte l'itérateur en argument
|
||||
const char* t = string; // utf8(::unchecked)::next affecte l'itérateur en argument
|
||||
nzUInt32 c = NzUnicode::GetLowercase(utf8::unchecked::next(t));
|
||||
do
|
||||
{
|
||||
@@ -1607,7 +1607,7 @@ unsigned int NzString::FindLastWord(const char* string, int start, nzUInt32 flag
|
||||
}
|
||||
else
|
||||
{
|
||||
const char* t = string; // utf8(::unchecked)::next affecte l'itérateur en argument
|
||||
const char* t = string; // utf8(::unchecked)::next affecte l'itérateur en argument
|
||||
nzUInt32 c = utf8::unchecked::next(t);
|
||||
do
|
||||
{
|
||||
@@ -1742,13 +1742,13 @@ unsigned int NzString::FindLastWord(const NzString& string, int start, nzUInt32
|
||||
if (flags & HandleUtf8)
|
||||
{
|
||||
if (utf8::internal::is_trail(*ptr))
|
||||
utf8::unchecked::prior(ptr); // On s'assure d'avoir un pointeur vers le début d'un caractère
|
||||
utf8::unchecked::prior(ptr); // On s'assure d'avoir un pointeur vers le début d'un caractère
|
||||
|
||||
utf8::unchecked::iterator<const char*> it(ptr);
|
||||
|
||||
if (flags & CaseInsensitive)
|
||||
{
|
||||
const char* t = string.m_sharedString->string; // utf8(::unchecked)::next affecte l'itérateur en argument
|
||||
const char* t = string.m_sharedString->string; // utf8(::unchecked)::next affecte l'itérateur en argument
|
||||
nzUInt32 c = NzUnicode::GetLowercase(utf8::unchecked::next(t));
|
||||
do
|
||||
{
|
||||
@@ -1790,7 +1790,7 @@ unsigned int NzString::FindLastWord(const NzString& string, int start, nzUInt32
|
||||
}
|
||||
else
|
||||
{
|
||||
const char* t = string.m_sharedString->string; // utf8(::unchecked)::next affecte l'itérateur en argument
|
||||
const char* t = string.m_sharedString->string; // utf8(::unchecked)::next affecte l'itérateur en argument
|
||||
nzUInt32 c = utf8::unchecked::next(t);
|
||||
do
|
||||
{
|
||||
@@ -1917,13 +1917,13 @@ unsigned int NzString::FindWord(const char* string, int start, nzUInt32 flags) c
|
||||
if (flags & HandleUtf8)
|
||||
{
|
||||
if (utf8::internal::is_trail(*ptr))
|
||||
utf8::unchecked::prior(ptr); // On s'assure d'avoir un pointeur vers le début d'un caractère
|
||||
utf8::unchecked::prior(ptr); // On s'assure d'avoir un pointeur vers le début d'un caractère
|
||||
|
||||
utf8::unchecked::iterator<const char*> it(ptr);
|
||||
|
||||
if (flags & CaseInsensitive)
|
||||
{
|
||||
const char* t = string; // utf8(::unchecked)::next affecte l'itérateur en argument
|
||||
const char* t = string; // utf8(::unchecked)::next affecte l'itérateur en argument
|
||||
nzUInt32 c = NzUnicode::GetLowercase(utf8::unchecked::next(t));
|
||||
|
||||
do
|
||||
@@ -1963,7 +1963,7 @@ unsigned int NzString::FindWord(const char* string, int start, nzUInt32 flags) c
|
||||
}
|
||||
else
|
||||
{
|
||||
const char* t = string; // utf8(::unchecked)::next affecte l'itérateur en argument
|
||||
const char* t = string; // utf8(::unchecked)::next affecte l'itérateur en argument
|
||||
nzUInt32 c = NzUnicode::GetLowercase(utf8::unchecked::next(t));
|
||||
|
||||
do
|
||||
@@ -2087,15 +2087,15 @@ unsigned int NzString::FindWord(const NzString& string, int start, nzUInt32 flag
|
||||
char* ptr = m_sharedString->string;
|
||||
if (flags & HandleUtf8)
|
||||
{
|
||||
///Algo 3.FindWord#3 (Itérateur trop lent pour #2)
|
||||
///Algo 3.FindWord#3 (Itérateur trop lent pour #2)
|
||||
if (utf8::internal::is_trail(*ptr))
|
||||
utf8::unchecked::prior(ptr); // On s'assure d'avoir un pointeur vers le début d'un caractère
|
||||
utf8::unchecked::prior(ptr); // On s'assure d'avoir un pointeur vers le début d'un caractère
|
||||
|
||||
utf8::unchecked::iterator<const char*> it(ptr);
|
||||
|
||||
if (flags & CaseInsensitive)
|
||||
{
|
||||
const char* t = string.m_sharedString->string; // utf8(::unchecked)::next affecte l'itérateur en argument
|
||||
const char* t = string.m_sharedString->string; // utf8(::unchecked)::next affecte l'itérateur en argument
|
||||
nzUInt32 c = NzUnicode::GetLowercase(utf8::unchecked::next(t));
|
||||
|
||||
do
|
||||
@@ -2135,7 +2135,7 @@ unsigned int NzString::FindWord(const NzString& string, int start, nzUInt32 flag
|
||||
}
|
||||
else
|
||||
{
|
||||
const char* t = string.m_sharedString->string; // utf8(::unchecked)::next affecte l'itérateur en argument
|
||||
const char* t = string.m_sharedString->string; // utf8(::unchecked)::next affecte l'itérateur en argument
|
||||
nzUInt32 c = NzUnicode::GetLowercase(utf8::unchecked::next(t));
|
||||
|
||||
do
|
||||
@@ -2213,7 +2213,7 @@ unsigned int NzString::FindWord(const NzString& string, int start, nzUInt32 flag
|
||||
{
|
||||
while ((ptr = std::strstr(ptr, string.m_sharedString->string)))
|
||||
{
|
||||
// Si le mot est bien isolé
|
||||
// Si le mot est bien isolé
|
||||
if ((ptr == m_sharedString->string || std::isspace(*(ptr-1))) && (*(ptr+m_sharedString->size) == '\0' || std::isspace(*(ptr+m_sharedString->size))))
|
||||
return ptr - m_sharedString->string;
|
||||
|
||||
@@ -2396,11 +2396,11 @@ NzString NzString::GetWord(unsigned int index, nzUInt32 flags) const
|
||||
if (m_sharedString->size == 0)
|
||||
return NzString();
|
||||
|
||||
NzString temp = Simplified(flags); // Évitons les mauvaises surprises
|
||||
NzString temp = Simplified(flags); // Évitons les mauvaises surprises
|
||||
if (temp.IsEmpty())
|
||||
return NzString();
|
||||
|
||||
unsigned int foundPos = temp.Find(' '); // Simplified nous assure que nous n'avons plus que des espaces comme séparation
|
||||
unsigned int foundPos = temp.Find(' '); // Simplified nous assure que nous n'avons plus que des espaces comme séparation
|
||||
unsigned int lastPos = 0;
|
||||
for (; index > 0; --index)
|
||||
{
|
||||
@@ -2475,7 +2475,7 @@ NzString& NzString::Insert(int pos, char character)
|
||||
|
||||
unsigned int start = std::min(static_cast<unsigned int>(pos), m_sharedString->size);
|
||||
|
||||
// Si le buffer est déjà suffisamment grand
|
||||
// Si le buffer est déjà suffisamment grand
|
||||
if (m_sharedString->capacity >= m_sharedString->size+1)
|
||||
{
|
||||
EnsureOwnership();
|
||||
@@ -2520,7 +2520,7 @@ NzString& NzString::Insert(int pos, const char* string)
|
||||
|
||||
unsigned int start = std::min(static_cast<unsigned int>(pos), m_sharedString->size);
|
||||
|
||||
// Si le buffer est déjà suffisamment grand
|
||||
// Si le buffer est déjà suffisamment grand
|
||||
unsigned int len = std::strlen(string);
|
||||
if (m_sharedString->capacity >= m_sharedString->size+len)
|
||||
{
|
||||
@@ -2571,7 +2571,7 @@ NzString& NzString::Insert(int pos, const NzString& string)
|
||||
|
||||
unsigned int start = std::min(static_cast<unsigned int>(pos), m_sharedString->size);
|
||||
|
||||
// Si le buffer est déjà suffisamment grand
|
||||
// Si le buffer est déjà suffisamment grand
|
||||
if (m_sharedString->capacity >= m_sharedString->size + string.m_sharedString->size)
|
||||
{
|
||||
EnsureOwnership();
|
||||
@@ -2828,7 +2828,7 @@ unsigned int NzString::Replace(const char* oldString, const char* replaceString,
|
||||
{
|
||||
bool found = false;
|
||||
|
||||
// Si aucun changement de taille n'est nécessaire, nous pouvons alors utiliser un algorithme bien plus rapide
|
||||
// Si aucun changement de taille n'est nécessaire, nous pouvons alors utiliser un algorithme bien plus rapide
|
||||
while ((pos = Find(oldString, pos, flags)) != npos)
|
||||
{
|
||||
if (!found)
|
||||
@@ -2869,7 +2869,7 @@ unsigned int NzString::Replace(const char* oldString, const char* replaceString,
|
||||
count++;
|
||||
}
|
||||
|
||||
std::strcpy(ptr, p); // Ajoute le caractère de fin par la même occasion
|
||||
std::strcpy(ptr, p); // Ajoute le caractère de fin par la même occasion
|
||||
|
||||
ReleaseString();
|
||||
m_sharedString = new SharedString;
|
||||
@@ -2898,7 +2898,7 @@ unsigned int NzString::Replace(const NzString& oldString, const NzString& replac
|
||||
{
|
||||
bool found = false;
|
||||
|
||||
// Si aucun changement de taille n'est nécessaire, nous pouvons alors utiliser un algorithme bien plus rapide
|
||||
// Si aucun changement de taille n'est nécessaire, nous pouvons alors utiliser un algorithme bien plus rapide
|
||||
while ((pos = Find(oldString, pos, flags)) != npos)
|
||||
{
|
||||
if (!found)
|
||||
@@ -2939,7 +2939,7 @@ unsigned int NzString::Replace(const NzString& oldString, const NzString& replac
|
||||
count++;
|
||||
}
|
||||
|
||||
std::strcpy(ptr, p); // Ajoute le caractère de fin par la même occasion
|
||||
std::strcpy(ptr, p); // Ajoute le caractère de fin par la même occasion
|
||||
|
||||
ReleaseString();
|
||||
m_sharedString = new SharedString;
|
||||
@@ -2953,7 +2953,7 @@ unsigned int NzString::Replace(const NzString& oldString, const NzString& replac
|
||||
|
||||
unsigned int NzString::ReplaceAny(const char* oldCharacters, char replaceCharacter, int start, nzUInt32 flags)
|
||||
{
|
||||
///FIXME: Ne gère pas l'UTF-8
|
||||
///FIXME: Ne gère pas l'UTF-8
|
||||
if (!oldCharacters || !oldCharacters[0])
|
||||
return 0;
|
||||
|
||||
@@ -3040,7 +3040,7 @@ unsigned int NzString::ReplaceAny(const char* oldCharacters, char replaceCharact
|
||||
|
||||
unsigned int count = 0;
|
||||
|
||||
if (rSize == 1) // On utilise un algorithme optimisé
|
||||
if (rSize == 1) // On utilise un algorithme optimisé
|
||||
{
|
||||
EnsureOwnership();
|
||||
|
||||
@@ -3070,7 +3070,7 @@ unsigned int NzString::ReplaceAny(const char* oldCharacters, char replaceCharact
|
||||
unsigned int j = 0;
|
||||
for (unsigned int i = 0; i < m_sharedString->size; ++i)
|
||||
{
|
||||
if (i < pos) // Avant la position où on est censé commencer à remplacer, on ne fait que recopier
|
||||
if (i < pos) // Avant la position où on est censé commencer à remplacer, on ne fait que recopier
|
||||
newString[j++] = m_sharedString->string[i];
|
||||
else
|
||||
{
|
||||
@@ -3084,7 +3084,7 @@ unsigned int NzString::ReplaceAny(const char* oldCharacters, char replaceCharact
|
||||
|
||||
++count;
|
||||
found = true;
|
||||
break; // Simple façon d'éviter la ligne après la boucle
|
||||
break; // Simple façon d'éviter la ligne après la boucle
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3119,7 +3119,7 @@ unsigned int NzString::ReplaceAny(const char* oldCharacters, char replaceCharact
|
||||
|
||||
unsigned int count = 0;
|
||||
|
||||
if (replaceString.m_sharedString->size == 1) // On utilise un algorithme optimisé
|
||||
if (replaceString.m_sharedString->size == 1) // On utilise un algorithme optimisé
|
||||
{
|
||||
EnsureOwnership();
|
||||
|
||||
@@ -3149,7 +3149,7 @@ unsigned int NzString::ReplaceAny(const char* oldCharacters, char replaceCharact
|
||||
unsigned int j = 0;
|
||||
for (unsigned int i = 0; i < m_sharedString->size; ++i)
|
||||
{
|
||||
if (i < pos) // Avant la position où on est censé commencer à remplacer, on ne fait que recopier
|
||||
if (i < pos) // Avant la position où on est censé commencer à remplacer, on ne fait que recopier
|
||||
newString[j++] = m_sharedString->string[i];
|
||||
else
|
||||
{
|
||||
@@ -3163,7 +3163,7 @@ unsigned int NzString::ReplaceAny(const char* oldCharacters, char replaceCharact
|
||||
|
||||
++count;
|
||||
found = true;
|
||||
break; // Simple façon d'éviter la ligne après la boucle
|
||||
break; // Simple façon d'éviter la ligne après la boucle
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3217,7 +3217,7 @@ NzString& NzString::Resize(int size, char character)
|
||||
{
|
||||
EnsureOwnership();
|
||||
|
||||
// Nous avons déjà la place requise, contentons-nous de remplir le buffer
|
||||
// Nous avons déjà la place requise, contentons-nous de remplir le buffer
|
||||
if (character != '\0' && newSize > m_sharedString->size)
|
||||
{
|
||||
char* ptr = &m_sharedString->string[m_sharedString->size];
|
||||
@@ -3229,7 +3229,7 @@ NzString& NzString::Resize(int size, char character)
|
||||
m_sharedString->size = newSize;
|
||||
m_sharedString->string[newSize] = '\0';
|
||||
}
|
||||
else // On veut forcément agrandir la chaine
|
||||
else // On veut forcément agrandir la chaine
|
||||
{
|
||||
char* newString = new char[newSize+1];
|
||||
if (m_sharedString->size != 0)
|
||||
@@ -3832,7 +3832,7 @@ bool NzString::ToBool(bool* value, nzUInt32 flags) const
|
||||
else
|
||||
{
|
||||
if (flags & CaseInsensitive)
|
||||
word = word.ToLower(); // Les mots identifiés sont en ASCII, inutile de passer le flag unicode
|
||||
word = word.ToLower(); // Les mots identifiés sont en ASCII, inutile de passer le flag unicode
|
||||
|
||||
if (word == "true")
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Core/StringStream.hpp>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
// Inspiré du code de la SFML par Laurent Gomila
|
||||
// Inspiré du code de la SFML par Laurent Gomila
|
||||
|
||||
#include <Nazara/Core/Thread.hpp>
|
||||
#include <Nazara/Core/Config.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Core/Unicode.hpp>
|
||||
@@ -9,16 +9,16 @@
|
||||
#if NAZARA_CORE_INCLUDE_UNICODEDATA
|
||||
struct Character
|
||||
{
|
||||
nzUInt16 category; // Le type du caractère
|
||||
nzUInt8 direction; // Le sens de lecure du caractère
|
||||
nzUInt32 lowerCase; // Le caractère correspondant en minuscule
|
||||
nzUInt32 titleCase; // Le caractère correspondant en titre
|
||||
nzUInt32 upperCase; // Le caractère correspondant en majuscule
|
||||
nzUInt16 category; // Le type du caractère
|
||||
nzUInt8 direction; // Le sens de lecure du caractère
|
||||
nzUInt32 lowerCase; // Le caractère correspondant en minuscule
|
||||
nzUInt32 titleCase; // Le caractère correspondant en titre
|
||||
nzUInt32 upperCase; // Le caractère correspondant en majuscule
|
||||
};
|
||||
|
||||
#include <Nazara/Core/UnicodeData.hpp>
|
||||
|
||||
#else // Implémentation bidon
|
||||
#else // Implémentation bidon
|
||||
|
||||
NzUnicode::Category NzUnicode::GetCategory(char32_t character)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Core/Win32/ClockImpl.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
// Source: http://www.cs.wustl.edu/~schmidt/win32-cv-1.html
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
// http://www.cs.wustl.edu/~schmidt/win32-cv-1.html
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Core/Win32/DirectoryImpl.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Core/Win32/DynLibImpl.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Core/Win32/FileImpl.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Core/Win32/MutexImpl.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Core/Win32/SemaphoreImpl.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
// Inspiré du code de la SFML par Laurent Gomila
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
// Inspiré du code de la SFML par Laurent Gomila
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Core/Win32/Time.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Rémi Bèges
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Rémi Bèges
|
||||
// This file is part of the "Nazara Engine - Noise module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Noise/ComplexNoiseBase.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Rémi Bèges
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Rémi Bèges
|
||||
// This file is part of the "Nazara Engine - Noise module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Noise/Config.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Rémi Bèges
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Rémi Bèges
|
||||
// This file is part of the "Nazara Engine - Noise module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Noise/Noise.hpp>
|
||||
@@ -12,9 +12,9 @@
|
||||
bool NzNoise::Initialize()
|
||||
{
|
||||
if (s_moduleReferenceCouter++ != 0)
|
||||
return true; // Déjà initialisé
|
||||
return true; // Déjà initialisé
|
||||
|
||||
// Initialisation des dépendances
|
||||
// Initialisation des dépendances
|
||||
if (!NzCore::Initialize())
|
||||
{
|
||||
NazaraError("Failed to initialize core module");
|
||||
@@ -36,11 +36,11 @@ bool NzNoise::IsInitialized()
|
||||
void NzNoise::Uninitialize()
|
||||
{
|
||||
if (--s_moduleReferenceCouter != 0)
|
||||
return; // Encore utilisé
|
||||
return; // Encore utilisé
|
||||
|
||||
// Libération du module
|
||||
// Libération du module
|
||||
|
||||
// Libération des dépendances
|
||||
// Libération des dépendances
|
||||
NzCore::Uninitialize();
|
||||
|
||||
NazaraNotice("Uninitialized: Noise module");
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Rémi Bèges
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Rémi Bèges
|
||||
// This file is part of the "Nazara Engine - Noise module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Noise/NoiseBase.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Rémi Bèges
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Rémi Bèges
|
||||
// This file is part of the "Nazara Engine - Noise module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Noise/NoiseMachine.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Renderer module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Renderer/OpenGL.hpp>
|
||||
@@ -62,7 +62,7 @@ namespace
|
||||
break;
|
||||
|
||||
default:
|
||||
// Peut être rajouté par une extension
|
||||
// Peut être rajouté par une extension
|
||||
ss << "Unknown";
|
||||
break;
|
||||
}
|
||||
@@ -96,7 +96,7 @@ namespace
|
||||
break;
|
||||
|
||||
default:
|
||||
// Peut être rajouté par une extension
|
||||
// Peut être rajouté par une extension
|
||||
ss << "Unknown";
|
||||
break;
|
||||
}
|
||||
@@ -118,7 +118,7 @@ namespace
|
||||
break;
|
||||
|
||||
default:
|
||||
// Peut être rajouté par une extension
|
||||
// Peut être rajouté par une extension
|
||||
ss << "Unknown";
|
||||
break;
|
||||
}
|
||||
@@ -230,7 +230,7 @@ bool NzContext::SetActive(bool active)
|
||||
}
|
||||
#endif
|
||||
|
||||
// Si le contexte est déjà activé/désactivé
|
||||
// Si le contexte est déjà activé/désactivé
|
||||
if ((currentContext == this) == active)
|
||||
return true;
|
||||
|
||||
@@ -322,7 +322,7 @@ bool NzContext::Initialize()
|
||||
{
|
||||
NzContextParameters parameters;
|
||||
// parameters.compatibilityProfile = true;
|
||||
parameters.shared = false; // Difficile de partager le contexte de référence avec lui-même
|
||||
parameters.shared = false; // Difficile de partager le contexte de référence avec lui-même
|
||||
|
||||
s_reference = new NzContext;
|
||||
if (!s_reference->Create(parameters))
|
||||
@@ -333,7 +333,7 @@ bool NzContext::Initialize()
|
||||
return false;
|
||||
}
|
||||
|
||||
// Le contexte de référence doit rester désactivé pour le partage
|
||||
// Le contexte de référence doit rester désactivé pour le partage
|
||||
s_reference->SetActive(false);
|
||||
|
||||
NzContextParameters::defaultShareContext = s_reference;
|
||||
@@ -346,7 +346,7 @@ void NzContext::Uninitialize()
|
||||
for (NzContext* context : contexts)
|
||||
delete context;
|
||||
|
||||
contexts.clear(); // On supprime tous les contextes créés
|
||||
contexts.clear(); // On supprime tous les contextes créés
|
||||
|
||||
delete s_reference;
|
||||
s_reference = nullptr;
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Renderer module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Renderer/ContextParameters.hpp>
|
||||
#include <Nazara/Renderer/Config.hpp>
|
||||
#include <Nazara/Renderer/Debug.hpp>
|
||||
|
||||
// Version majeure d'OpenGL, initialisé par NzOpenGL::Initialize()
|
||||
// Version majeure d'OpenGL, initialisé par NzOpenGL::Initialize()
|
||||
nzUInt8 NzContextParameters::defaultMajorVersion;
|
||||
|
||||
// Version majeure d'OpenGL, initialisé par NzOpenGL::Initialize()
|
||||
// Version majeure d'OpenGL, initialisé par NzOpenGL::Initialize()
|
||||
nzUInt8 NzContextParameters::defaultMinorVersion;
|
||||
|
||||
// Contexte de partage par défaut, initialisé par NzOpenGL::Initialize()
|
||||
// Contexte de partage par défaut, initialisé par NzOpenGL::Initialize()
|
||||
const NzContext* NzContextParameters::defaultShareContext = nullptr;
|
||||
|
||||
// Si possible, garder la compatibilité avec les fonctionnalités dépréciées
|
||||
// Si possible, garder la compatibilité avec les fonctionnalités dépréciées
|
||||
bool NzContextParameters::defaultCompatibilityProfile = false;
|
||||
|
||||
// Mode debug d'OpenGL par défaut
|
||||
// Mode debug d'OpenGL par défaut
|
||||
#if NAZARA_RENDERER_OPENGL_DEBUG || defined(NAZARA_DEBUG)
|
||||
bool NzContextParameters::defaultDebugMode = true;
|
||||
#else
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Renderer module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Renderer/Config.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Renderer module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Renderer/OpenGL.hpp>
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
namespace
|
||||
{
|
||||
///FIXME: Déclaré deux fois (ici et dans Renderer.cpp)
|
||||
///FIXME: Déclaré deux fois (ici et dans Renderer.cpp)
|
||||
const nzUInt8 attribIndex[] =
|
||||
{
|
||||
2, // nzElementUsage_Diffuse
|
||||
@@ -111,9 +111,9 @@ bool NzGLSLShader::Compile()
|
||||
if (length > 1)
|
||||
{
|
||||
m_log.Clear(true);
|
||||
m_log.Reserve(length+19-1); // La taille retournée est celle du buffer (Avec caractère de fin)
|
||||
m_log.Reserve(length+19-1); // La taille retournée est celle du buffer (Avec caractère de fin)
|
||||
m_log.Prepend("Linkage error: ");
|
||||
m_log.Resize(length+19-1); // Extension du buffer d'écriture pour ajouter le log
|
||||
m_log.Resize(length+19-1); // Extension du buffer d'écriture pour ajouter le log
|
||||
|
||||
glGetProgramInfoLog(m_program, length-1, nullptr, &m_log[19]);
|
||||
}
|
||||
@@ -191,7 +191,7 @@ NzString NzGLSLShader::GetSourceCode(nzShaderType type) const
|
||||
glGetShaderiv(m_shaders[type], GL_SHADER_SOURCE_LENGTH, &length);
|
||||
if (length > 1)
|
||||
{
|
||||
source.Resize(length-1); // La taille retournée est celle du buffer (Avec caractère de fin)
|
||||
source.Resize(length-1); // La taille retournée est celle du buffer (Avec caractère de fin)
|
||||
glGetShaderSource(m_shaders[type], length, nullptr, &source[0]);
|
||||
}
|
||||
|
||||
@@ -260,9 +260,9 @@ bool NzGLSLShader::Load(nzShaderType type, const NzString& source)
|
||||
if (length > 1)
|
||||
{
|
||||
m_log.Clear(true);
|
||||
m_log.Reserve(length+19-1); // La taille retournée est celle du buffer (Avec caractère de fin)
|
||||
m_log.Reserve(length+19-1); // La taille retournée est celle du buffer (Avec caractère de fin)
|
||||
m_log.Prepend("Compilation error: ");
|
||||
m_log.Resize(length+19-1); // Extension du buffer d'écriture pour ajouter le log
|
||||
m_log.Resize(length+19-1); // Extension du buffer d'écriture pour ajouter le log
|
||||
|
||||
glGetShaderInfoLog(shader, length-1, nullptr, &m_log[19]);
|
||||
}
|
||||
@@ -384,7 +384,7 @@ bool NzGLSLShader::SendTexture(int location, const NzTexture* texture)
|
||||
auto it = m_textures.find(location);
|
||||
if (it != m_textures.end())
|
||||
{
|
||||
// Slot déjà utilisé
|
||||
// Slot déjà utilisé
|
||||
TextureSlot& slot = it->second;
|
||||
if (slot.texture != texture)
|
||||
{
|
||||
@@ -412,21 +412,21 @@ bool NzGLSLShader::SendTexture(int location, const NzTexture* texture)
|
||||
return false;
|
||||
}
|
||||
|
||||
// À partir d'ici nous savons qu'il y a au moins un identifiant de texture libre
|
||||
// À partir d'ici nous savons qu'il y a au moins un identifiant de texture libre
|
||||
nzUInt8 unit;
|
||||
if (unitUsed == 0)
|
||||
// Pas d'unité utilisée, la tâche est simple
|
||||
// Pas d'unité utilisée, la tâche est simple
|
||||
unit = 0;
|
||||
else
|
||||
{
|
||||
auto it2 = m_textures.rbegin(); // Itérateur vers la fin de la map
|
||||
auto it2 = m_textures.rbegin(); // Itérateur vers la fin de la map
|
||||
unit = it2->second.unit;
|
||||
if (unit == maxUnits-1)
|
||||
{
|
||||
// Il y a une place libre, mais pas à la fin
|
||||
// Il y a une place libre, mais pas à la fin
|
||||
for (; it2 != m_textures.rend(); ++it2)
|
||||
{
|
||||
if (unit - it2->second.unit > 1) // Si l'espace entre les indices est supérieur à 1, alors il y a une place libre
|
||||
if (unit - it2->second.unit > 1) // Si l'espace entre les indices est supérieur à 1, alors il y a une place libre
|
||||
{
|
||||
unit--;
|
||||
break;
|
||||
@@ -434,7 +434,7 @@ bool NzGLSLShader::SendTexture(int location, const NzTexture* texture)
|
||||
}
|
||||
}
|
||||
else
|
||||
// Il y a une place libre à la fin
|
||||
// Il y a une place libre à la fin
|
||||
unit++;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Renderer module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Renderer module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Renderer/OpenGL.hpp>
|
||||
@@ -37,8 +37,8 @@ namespace
|
||||
};
|
||||
|
||||
GLenum bufferUsage[] = {
|
||||
// J'ai choisi DYNAMIC à la place de STREAM car DYNAMIC semble plus adapté au profil "une mise à jour pour quelques rendus"
|
||||
// Ce qui est je pense le scénario qui arrivera le plus souvent (Prévoir une option pour permettre d'utiliser le STREAM_DRAW ?)
|
||||
// J'ai choisi DYNAMIC à la place de STREAM car DYNAMIC semble plus adapté au profil "une mise à jour pour quelques rendus"
|
||||
// Ce qui est je pense le scénario qui arrivera le plus souvent (Prévoir une option pour permettre d'utiliser le STREAM_DRAW ?)
|
||||
// Source: http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=160839
|
||||
GL_DYNAMIC_DRAW, // nzBufferUsage_Dynamic
|
||||
GL_STATIC_DRAW // nzBufferUsage_Static
|
||||
@@ -125,7 +125,7 @@ bool NzHardwareBuffer::Create(unsigned int size, nzBufferUsage usage)
|
||||
glBindBuffer(bufferTarget[m_type], m_buffer);
|
||||
glBufferData(bufferTarget[m_type], size, nullptr, bufferUsage[usage]);
|
||||
|
||||
// Pour ne pas perturber le rendu, on interfère pas avec le binding déjà présent
|
||||
// Pour ne pas perturber le rendu, on interfère pas avec le binding déjà présent
|
||||
if (previous != 0)
|
||||
glBindBuffer(bufferTarget[m_type], previous);
|
||||
|
||||
@@ -172,7 +172,7 @@ bool NzHardwareBuffer::Fill(const void* data, unsigned int offset, unsigned int
|
||||
|
||||
if (glUnmapBuffer(bufferTarget[m_type]) != GL_TRUE)
|
||||
{
|
||||
// Une erreur rare est survenue, nous devons réinitialiser le buffer
|
||||
// Une erreur rare est survenue, nous devons réinitialiser le buffer
|
||||
NazaraError("Failed to unmap buffer, reinitialising content... (OpenGL error : 0x" + NzString::Number(glGetError(), 16) + ')');
|
||||
|
||||
glBufferData(bufferTarget[m_type], m_parent->GetSize(), nullptr, bufferUsage[m_parent->GetStorage()]);
|
||||
@@ -181,7 +181,7 @@ bool NzHardwareBuffer::Fill(const void* data, unsigned int offset, unsigned int
|
||||
}
|
||||
}
|
||||
|
||||
// Inutile de rebinder s'il n'y avait aucun buffer (Optimise les opérations chaînées)
|
||||
// Inutile de rebinder s'il n'y avait aucun buffer (Optimise les opérations chaînées)
|
||||
if (previous != m_buffer && previous != 0)
|
||||
glBindBuffer(bufferTarget[m_type], previous);
|
||||
|
||||
@@ -202,7 +202,7 @@ void* NzHardwareBuffer::Map(nzBufferAccess access, unsigned int offset, unsigned
|
||||
{
|
||||
NzContext::EnsureContext();
|
||||
|
||||
// Pour ne pas perturber le rendu, on interfère pas avec le binding déjà présent
|
||||
// Pour ne pas perturber le rendu, on interfère pas avec le binding déjà présent
|
||||
GLuint previous;
|
||||
glGetIntegerv(bufferTargetBinding[m_type], reinterpret_cast<GLint*>(&previous));
|
||||
|
||||
@@ -211,7 +211,7 @@ void* NzHardwareBuffer::Map(nzBufferAccess access, unsigned int offset, unsigned
|
||||
|
||||
void* ptr = mapBuffer(m_type, access, offset, size);
|
||||
|
||||
// Inutile de rebinder s'il n'y avait aucun buffer (Optimise les opérrations chaînées)
|
||||
// Inutile de rebinder s'il n'y avait aucun buffer (Optimise les opérrations chaînées)
|
||||
if (previous != m_buffer && previous != 0)
|
||||
glBindBuffer(bufferTarget[m_type], previous);
|
||||
|
||||
@@ -230,19 +230,19 @@ bool NzHardwareBuffer::Unmap()
|
||||
|
||||
if (glUnmapBuffer(bufferTarget[m_type]) != GL_TRUE)
|
||||
{
|
||||
// Une erreur rare est survenue, nous devons réinitialiser le buffer
|
||||
// Une erreur rare est survenue, nous devons réinitialiser le buffer
|
||||
NazaraError("Failed to unmap buffer, reinitialising content... (OpenGL error : 0x" + NzString::Number(glGetError(), 16) + ')');
|
||||
|
||||
glBufferData(bufferTarget[m_type], m_parent->GetSize(), nullptr, bufferUsage[m_parent->GetStorage()]);
|
||||
|
||||
// Inutile de rebinder s'il n'y avait aucun buffer (Optimise les opérations chaînées)
|
||||
// Inutile de rebinder s'il n'y avait aucun buffer (Optimise les opérations chaînées)
|
||||
if (previous != m_buffer && previous != 0)
|
||||
glBindBuffer(bufferTarget[m_type], previous);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Inutile de rebinder s'il n'y avait aucun buffer (Optimise les opérations chaînées)
|
||||
// Inutile de rebinder s'il n'y avait aucun buffer (Optimise les opérations chaînées)
|
||||
if (previous != m_buffer && previous != 0)
|
||||
glBindBuffer(bufferTarget[m_type], previous);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Renderer module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Renderer module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Renderer/OpenGL.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Renderer module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Renderer/OpenGL.hpp>
|
||||
@@ -69,7 +69,7 @@ namespace
|
||||
return false;
|
||||
}
|
||||
|
||||
// On peut sûrement faire plus rapide mais comme ça ne se fait qu'une fois et que NzString implémente le COW...
|
||||
// On peut sûrement faire plus rapide mais comme ça ne se fait qu'une fois et que NzString implémente le COW...
|
||||
std::vector<NzString> ext;
|
||||
extensionString.Split(ext);
|
||||
|
||||
@@ -124,18 +124,18 @@ bool NzOpenGL::Initialize()
|
||||
return false;
|
||||
}
|
||||
|
||||
// Le chargement des fonctions OpenGL nécessite un contexte OpenGL
|
||||
// Le chargement des fonctions OpenGL nécessite un contexte OpenGL
|
||||
NzContextParameters parameters;
|
||||
parameters.majorVersion = 2;
|
||||
parameters.minorVersion = 0;
|
||||
parameters.shared = false;
|
||||
|
||||
/*
|
||||
Note: Même le contexte de chargement nécessite quelques fonctions de base pour correctement s'initialiser
|
||||
Pour cette raison, deux contextes sont créés, le premier sert à récupérer les fonctions permetttant
|
||||
de créer le second avec les bons paramètres.
|
||||
Note: Même le contexte de chargement nécessite quelques fonctions de base pour correctement s'initialiser
|
||||
Pour cette raison, deux contextes sont créés, le premier sert à récupérer les fonctions permetttant
|
||||
de créer le second avec les bons paramètres.
|
||||
|
||||
Non sérieusement si quelqu'un a une meilleure idée qu'il me le dise
|
||||
Non sérieusement si quelqu'un a une meilleure idée qu'il me le dise
|
||||
*/
|
||||
|
||||
/****************************************Initialisation****************************************/
|
||||
@@ -158,9 +158,9 @@ bool NzOpenGL::Initialize()
|
||||
glXCreateContextAttribs = reinterpret_cast<PFNGLXCREATECONTEXTATTRIBSARBPROC>(LoadEntry("glXCreateContextAttribsARB", false));
|
||||
#endif
|
||||
|
||||
// Récupération de la version d'OpenGL
|
||||
// Ce code se base sur le fait que la carte graphique renverra un contexte de compatibilité avec la plus haute version supportée
|
||||
// Ce qui semble vrai au moins chez ATI/AMD et NVidia, mais si quelqu'un à une meilleure idée ...
|
||||
// Récupération de la version d'OpenGL
|
||||
// Ce code se base sur le fait que la carte graphique renverra un contexte de compatibilité avec la plus haute version supportée
|
||||
// Ce qui semble vrai au moins chez ATI/AMD et NVidia, mais si quelqu'un à une meilleure idée ...
|
||||
glGetString = reinterpret_cast<PFNGLGETSTRINGPROC>(LoadEntry("glGetString", false));
|
||||
if (!glGetString)
|
||||
{
|
||||
@@ -440,7 +440,7 @@ bool NzOpenGL::Initialize()
|
||||
glProgramUniform4fv = reinterpret_cast<PFNGLPROGRAMUNIFORM4FVPROC>(LoadEntry("glProgramUniform4fv"));
|
||||
glProgramUniformMatrix4fv = reinterpret_cast<PFNGLPROGRAMUNIFORMMATRIX4FVPROC>(LoadEntry("glProgramUniformMatrix4fv"));
|
||||
|
||||
// Si ARB_gpu_shader_fp64 est supporté, alors cette extension donne également accès aux fonctions utilisant des double
|
||||
// Si ARB_gpu_shader_fp64 est supporté, alors cette extension donne également accès aux fonctions utilisant des double
|
||||
if (openGLextensions[NzOpenGL::FP64])
|
||||
{
|
||||
glProgramUniform1d = reinterpret_cast<PFNGLPROGRAMUNIFORM1DPROC>(LoadEntry("glProgramUniform1d"));
|
||||
@@ -469,9 +469,9 @@ bool NzOpenGL::Initialize()
|
||||
{
|
||||
try
|
||||
{
|
||||
// Hacky: Normalement incompatible à cause du internalFormat, GLenum pour l'extension et GLint pour le noyau
|
||||
// Mais la taille du type étant la même (GLenum est un typedef équivalent à GLint) et Nazara n'utilisant pas
|
||||
// Ce qui cause l'incompatibilité (les paramètres 1,2,3,4), je prends cette liberté
|
||||
// Hacky: Normalement incompatible à cause du internalFormat, GLenum pour l'extension et GLint pour le noyau
|
||||
// Mais la taille du type étant la même (GLenum est un typedef équivalent à GLint) et Nazara n'utilisant pas
|
||||
// Ce qui cause l'incompatibilité (les paramètres 1,2,3,4), je prends cette liberté
|
||||
glTexImage3D = reinterpret_cast<PFNGLTEXIMAGE3DPROC>(LoadEntry("glTexImage3DEXT"));
|
||||
glTexSubImage3D = reinterpret_cast<PFNGLTEXSUBIMAGE3DEXTPROC>(LoadEntry("glTexSubImage3DEXT"));
|
||||
|
||||
@@ -528,9 +528,9 @@ bool NzOpenGL::Initialize()
|
||||
if (!glGenerateMipmap)
|
||||
glGenerateMipmap = reinterpret_cast<PFNGLGENERATEMIPMAPEXTPROC>(LoadEntry("glGenerateMipmapEXT", false));
|
||||
|
||||
/****************************************Contexte de référence****************************************/
|
||||
/****************************************Contexte de référence****************************************/
|
||||
|
||||
///FIXME: Utiliser le contexte de chargement comme référence ? (Vérifier mode debug)
|
||||
///FIXME: Utiliser le contexte de chargement comme référence ? (Vérifier mode debug)
|
||||
if (!NzContext::Initialize())
|
||||
{
|
||||
NazaraError("Failed to initialize contexts");
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Renderer module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Renderer/RenderTarget.hpp>
|
||||
@@ -25,5 +25,5 @@ bool NzRenderTarget::SetActive(bool active)
|
||||
|
||||
void NzRenderTarget::Desactivate()
|
||||
{
|
||||
// Seuls les target sans contextes (ex: NzRenderTexture) nécessitent une désactivation
|
||||
// Seuls les target sans contextes (ex: NzRenderTexture) nécessitent une désactivation
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Renderer module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Renderer/OpenGL.hpp>
|
||||
@@ -39,7 +39,7 @@ NzRenderWindow::NzRenderWindow(NzWindowHandle handle, const NzContextParameters&
|
||||
|
||||
NzRenderWindow::~NzRenderWindow()
|
||||
{
|
||||
// Nécessaire si NzWindow::Destroy est appelé par son destructeur
|
||||
// Nécessaire si NzWindow::Destroy est appelé par son destructeur
|
||||
OnWindowDestroying();
|
||||
}
|
||||
|
||||
@@ -268,7 +268,7 @@ bool NzRenderWindow::OnWindowCreated()
|
||||
EnableVerticalSync(false);
|
||||
|
||||
#if NAZARA_RENDERER_ACTIVATE_RENDERWINDOW_ON_CREATION
|
||||
if (!SetActive(true)) // Les fenêtres s'activent à la création
|
||||
if (!SetActive(true)) // Les fenêtres s'activent à la création
|
||||
NazaraWarning("Failed to activate window");
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Renderer module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Renderer/OpenGL.hpp> // Pour éviter une redéfinition de WIN32_LEAN_AND_MEAN
|
||||
#include <Nazara/Renderer/OpenGL.hpp> // Pour éviter une redéfinition de WIN32_LEAN_AND_MEAN
|
||||
#include <Nazara/Renderer/Renderer.hpp>
|
||||
#include <Nazara/Core/Color.hpp>
|
||||
#include <Nazara/Core/Error.hpp>
|
||||
@@ -31,7 +31,7 @@ namespace
|
||||
0, // nzElementUsage_Position
|
||||
3, // nzElementUsage_Tangent
|
||||
|
||||
4 // nzElementUsage_TexCoord (Doit être le dernier de la liste car extensible)
|
||||
4 // nzElementUsage_TexCoord (Doit être le dernier de la liste car extensible)
|
||||
};
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ namespace
|
||||
GL_ZERO // nzStencilOperation_Zero
|
||||
};
|
||||
|
||||
///FIXME: Solution temporaire pour plus de facilité
|
||||
///FIXME: Solution temporaire pour plus de facilité
|
||||
enum nzMatrixCombination
|
||||
{
|
||||
nzMatrixCombination_ViewProj = nzMatrixType_Max+1,
|
||||
@@ -391,9 +391,9 @@ bool NzRenderer::HasCapability(nzRendererCap capability)
|
||||
bool NzRenderer::Initialize()
|
||||
{
|
||||
if (s_moduleReferenceCouter++ != 0)
|
||||
return true; // Déjà initialisé
|
||||
return true; // Déjà initialisé
|
||||
|
||||
// Initialisation des dépendances
|
||||
// Initialisation des dépendances
|
||||
if (!NzUtility::Initialize())
|
||||
{
|
||||
NazaraError("Failed to initialize utility module");
|
||||
@@ -431,7 +431,7 @@ bool NzRenderer::Initialize()
|
||||
s_vertexBuffer = nullptr;
|
||||
s_vertexDeclaration = nullptr;
|
||||
|
||||
// Récupération des capacités
|
||||
// Récupération des capacités
|
||||
s_capabilities[nzRendererCap_AnisotropicFilter] = NzOpenGL::IsSupported(NzOpenGL::AnisotropicFilter);
|
||||
s_capabilities[nzRendererCap_FP64] = NzOpenGL::IsSupported(NzOpenGL::FP64);
|
||||
s_capabilities[nzRendererCap_HardwareBuffer] = true; // Natif depuis OpenGL 1.5
|
||||
@@ -471,7 +471,7 @@ bool NzRenderer::Initialize()
|
||||
GLint maxVertexAttribs;
|
||||
glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &maxVertexAttribs);
|
||||
|
||||
// Impossible de binder plus de texcoords que d'attributes (en sachant qu'un certain nombre est déjà pris par les autres attributs)
|
||||
// Impossible de binder plus de texcoords que d'attributes (en sachant qu'un certain nombre est déjà pris par les autres attributs)
|
||||
s_maxTextureUnit = static_cast<unsigned int>(std::min(maxTextureUnits, maxVertexAttribs-attribIndex[nzElementUsage_TexCoord]));
|
||||
}
|
||||
else
|
||||
@@ -603,7 +603,7 @@ void NzRenderer::SetMatrix(nzMatrixType type, const NzMatrix4f& matrix)
|
||||
{
|
||||
s_matrix[type] = matrix;
|
||||
|
||||
// Cas particulier, la matrice projection doit être inversée sur l'axe Y à cause des conventions d'OpenGL
|
||||
// Cas particulier, la matrice projection doit être inversée sur l'axe Y à cause des conventions d'OpenGL
|
||||
if (type == nzMatrixType_Projection)
|
||||
s_matrix[type] *= NzMatrix4f::Scale(NzVector3f(1.f, -1.f, 1.f));
|
||||
|
||||
@@ -648,7 +648,7 @@ bool NzRenderer::SetShader(NzShader* shader)
|
||||
return false;
|
||||
}
|
||||
|
||||
// Récupération des indices des variables uniformes (-1 si la variable n'existe pas)
|
||||
// Récupération des indices des variables uniformes (-1 si la variable n'existe pas)
|
||||
s_matrixLocation[nzMatrixType_Projection] = shader->GetUniformLocation("ProjMatrix");
|
||||
s_matrixLocation[nzMatrixType_View] = shader->GetUniformLocation("ViewMatrix");
|
||||
s_matrixLocation[nzMatrixType_World] = shader->GetUniformLocation("WorldMatrix");
|
||||
@@ -815,12 +815,12 @@ void NzRenderer::SetViewport(const NzRectui& viewport)
|
||||
void NzRenderer::Uninitialize()
|
||||
{
|
||||
if (--s_moduleReferenceCouter != 0)
|
||||
return; // Encore utilisé
|
||||
return; // Encore utilisé
|
||||
|
||||
// Libération du module
|
||||
// Libération du module
|
||||
NzContext::EnsureContext();
|
||||
|
||||
// Libération des VAOs
|
||||
// Libération des VAOs
|
||||
for (auto it = s_vaos.begin(); it != s_vaos.end(); ++it)
|
||||
{
|
||||
GLuint vao = static_cast<GLuint>(it->second);
|
||||
@@ -831,7 +831,7 @@ void NzRenderer::Uninitialize()
|
||||
|
||||
NazaraNotice("Uninitialized: Renderer module");
|
||||
|
||||
// Libération des dépendances
|
||||
// Libération des dépendances
|
||||
NzUtility::Uninitialize();
|
||||
}
|
||||
|
||||
@@ -853,7 +853,7 @@ bool NzRenderer::EnsureStateUpdate()
|
||||
}
|
||||
#endif
|
||||
|
||||
// Il est plus rapide d'opérer sur l'implémentation du shader directement
|
||||
// Il est plus rapide d'opérer sur l'implémentation du shader directement
|
||||
NzShaderImpl* shaderImpl = s_shader->m_impl;
|
||||
|
||||
if (!shaderImpl->BindTextures())
|
||||
@@ -868,7 +868,7 @@ bool NzRenderer::EnsureStateUpdate()
|
||||
}
|
||||
}
|
||||
|
||||
// Cas spéciaux car il faut recalculer la matrice
|
||||
// Cas spéciaux car il faut recalculer la matrice
|
||||
if (!s_matrixUpdated[nzMatrixCombination_ViewProj])
|
||||
{
|
||||
s_matrix[nzMatrixCombination_ViewProj] = s_matrix[nzMatrixType_View] * s_matrix[nzMatrixType_Projection];
|
||||
@@ -925,21 +925,21 @@ bool NzRenderer::EnsureStateUpdate()
|
||||
bool update;
|
||||
GLuint vao;
|
||||
|
||||
// Si les VAOs sont supportés, on entoure nos appels par ceux-ci
|
||||
// Si les VAOs sont supportés, on entoure nos appels par ceux-ci
|
||||
if (vaoSupported)
|
||||
{
|
||||
// On recherche si un VAO existe déjà avec notre configuration
|
||||
// Note: Les VAOs ne sont pas partagés entre les contextes, ces derniers font donc partie de notre configuration
|
||||
// On recherche si un VAO existe déjà avec notre configuration
|
||||
// Note: Les VAOs ne sont pas partagés entre les contextes, ces derniers font donc partie de notre configuration
|
||||
|
||||
auto key = std::make_tuple(NzContext::GetCurrent(), s_indexBuffer, s_vertexBuffer, s_vertexDeclaration);
|
||||
auto it = s_vaos.find(key);
|
||||
if (it == s_vaos.end())
|
||||
{
|
||||
// On créé notre VAO
|
||||
// On créé notre VAO
|
||||
glGenVertexArrays(1, &vao);
|
||||
glBindVertexArray(vao);
|
||||
|
||||
// On l'ajoute à notre liste
|
||||
// On l'ajoute à notre liste
|
||||
s_vaos.insert(std::make_pair(key, static_cast<unsigned int>(vao)));
|
||||
|
||||
// Et on indique qu'on veut le programmer
|
||||
@@ -947,14 +947,14 @@ bool NzRenderer::EnsureStateUpdate()
|
||||
}
|
||||
else
|
||||
{
|
||||
// Notre VAO existe déjà, il est donc inutile de le reprogrammer
|
||||
// Notre VAO existe déjà, il est donc inutile de le reprogrammer
|
||||
vao = it->second;
|
||||
|
||||
update = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
update = true; // Fallback si les VAOs ne sont pas supportés
|
||||
update = true; // Fallback si les VAOs ne sont pas supportés
|
||||
|
||||
if (update)
|
||||
{
|
||||
@@ -991,11 +991,11 @@ bool NzRenderer::EnsureStateUpdate()
|
||||
|
||||
if (vaoSupported)
|
||||
{
|
||||
// Si nous venons de définir notre VAO, nous devons le débinder pour indiquer la fin de sa construction
|
||||
// Si nous venons de définir notre VAO, nous devons le débinder pour indiquer la fin de sa construction
|
||||
if (update)
|
||||
glBindVertexArray(0);
|
||||
|
||||
// Nous (re)bindons le VAO pour définir les attributs de vertice
|
||||
// Nous (re)bindons le VAO pour définir les attributs de vertice
|
||||
glBindVertexArray(vao);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Renderer module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Renderer/OpenGL.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Renderer module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Renderer/ShaderImpl.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Renderer module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Renderer module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Renderer/OpenGL.hpp>
|
||||
@@ -456,7 +456,7 @@ bool NzTexture::Create(nzImageType type, nzPixelFormat format, unsigned int widt
|
||||
|
||||
LockTexture(impl);
|
||||
|
||||
// Vérification du support par la carte graphique
|
||||
// Vérification du support par la carte graphique
|
||||
/*if (!CreateTexture(impl, true))
|
||||
{
|
||||
NazaraError("Texture's parameters not supported by driver");
|
||||
@@ -467,7 +467,7 @@ bool NzTexture::Create(nzImageType type, nzPixelFormat format, unsigned int widt
|
||||
return false;
|
||||
}*/
|
||||
|
||||
// Création de la texture
|
||||
// Création de la texture
|
||||
if (!CreateTexture(impl, false))
|
||||
{
|
||||
NazaraError("Failed to create texture");
|
||||
@@ -480,7 +480,7 @@ bool NzTexture::Create(nzImageType type, nzPixelFormat format, unsigned int widt
|
||||
|
||||
m_impl = impl;
|
||||
|
||||
// Paramètres par défaut
|
||||
// Paramètres par défaut
|
||||
SetFilterMode(nzTextureFilter_Nearest);
|
||||
SetMipmapRange(0, m_impl->levelCount);
|
||||
SetWrapMode(nzTextureWrap_Repeat);
|
||||
@@ -549,7 +549,7 @@ bool NzTexture::Download(NzImage* image) const
|
||||
unsigned int height = m_impl->height;
|
||||
unsigned int depth = m_impl->depth;
|
||||
|
||||
// Téléchargement...
|
||||
// Téléchargement...
|
||||
for (nzUInt8 level = 0; level < m_impl->levelCount; ++level)
|
||||
{
|
||||
glGetTexImage(openglTarget[m_impl->type], level, format.dataFormat, format.dataType, image->GetPixels(level));
|
||||
@@ -566,7 +566,7 @@ bool NzTexture::Download(NzImage* image) const
|
||||
|
||||
UnlockTexture(m_impl);
|
||||
|
||||
// Inversion de la texture pour le repère d'OpenGL
|
||||
// Inversion de la texture pour le repère d'OpenGL
|
||||
if (!image->FlipVertically())
|
||||
NazaraWarning("Failed to flip image");
|
||||
|
||||
@@ -1253,7 +1253,7 @@ bool NzTexture::Update(const nzUInt8* pixels, const NzRectui& rect, unsigned int
|
||||
|
||||
nzUInt8 bpp = NzPixelFormat::GetBPP(m_impl->format);
|
||||
|
||||
// Inversion de la texture pour le repère d'OpenGL
|
||||
// Inversion de la texture pour le repère d'OpenGL
|
||||
NzImage mirrored;
|
||||
mirrored.Create(m_impl->type, m_impl->format, rect.width, rect.height);
|
||||
mirrored.Update(pixels);
|
||||
@@ -1350,7 +1350,7 @@ bool NzTexture::Update(const nzUInt8* pixels, const NzCubeui& cube, nzUInt8 leve
|
||||
|
||||
nzUInt8 bpp = NzPixelFormat::GetBPP(m_impl->format);
|
||||
|
||||
// Inversion de la texture pour le repère d'OpenGL
|
||||
// Inversion de la texture pour le repère d'OpenGL
|
||||
unsigned int size = cube.width*cube.height*cube.depth*bpp;
|
||||
nzUInt8* mirrored = new nzUInt8[size];
|
||||
if (!NzPixelFormat::Flip(nzPixelFlipping_Vertically, m_impl->format, cube.width, cube.height, cube.depth, pixels, mirrored))
|
||||
@@ -1505,7 +1505,7 @@ bool NzTexture::UpdateFace(nzCubemapFace face, const nzUInt8* pixels, const NzRe
|
||||
|
||||
nzUInt8 bpp = NzPixelFormat::GetBPP(m_impl->format);
|
||||
|
||||
// Inversion de la texture pour le repère d'OpenGL
|
||||
// Inversion de la texture pour le repère d'OpenGL
|
||||
unsigned int size = rect.width*rect.height*bpp;
|
||||
nzUInt8* mirrored = new nzUInt8[size];
|
||||
if (!NzPixelFormat::Flip(nzPixelFlipping_Vertically, m_impl->format, rect.width, rect.height, 1, pixels, mirrored))
|
||||
@@ -1562,12 +1562,12 @@ bool NzTexture::IsFormatSupported(nzPixelFormat format)
|
||||
case nzPixelFormat_RGBA8:
|
||||
return true;
|
||||
|
||||
// Packed formats supportés depuis OpenGL 1.2
|
||||
// Packed formats supportés depuis OpenGL 1.2
|
||||
case nzPixelFormat_RGB5A1:
|
||||
case nzPixelFormat_RGBA4:
|
||||
return true;
|
||||
|
||||
// Dépréciés depuis OpenGL 3 (FIXME: Il doit bien exister des remplaçants ..)
|
||||
// Dépréciés depuis OpenGL 3 (FIXME: Il doit bien exister des remplaçants ..)
|
||||
case nzPixelFormat_L8:
|
||||
case nzPixelFormat_LA8:
|
||||
return false;
|
||||
@@ -1602,7 +1602,7 @@ bool NzTexture::IsTypeSupported(nzImageType type)
|
||||
case nzImageType_2D:
|
||||
case nzImageType_3D:
|
||||
case nzImageType_Cubemap:
|
||||
return true; // Tous supportés nativement dans OpenGL 2
|
||||
return true; // Tous supportés nativement dans OpenGL 2
|
||||
|
||||
case nzImageType_1D_Array:
|
||||
case nzImageType_2D_Array:
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Renderer module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
// Code inspiré de NeHe (Lesson1) et de la SFML par Laurent Gomila
|
||||
// Code inspiré de NeHe (Lesson1) et de la SFML par Laurent Gomila
|
||||
|
||||
#include <Nazara/Renderer/OpenGL.hpp>
|
||||
#include <Nazara/Renderer/Win32/ContextImpl.hpp>
|
||||
@@ -129,7 +129,7 @@ bool NzContextImpl::Create(NzContextParameters& parameters)
|
||||
return false;
|
||||
}
|
||||
|
||||
// Arrivé ici, le format de pixel est choisi, nous récupérons donc les paramètres réels du futur contexte
|
||||
// Arrivé ici, le format de pixel est choisi, nous récupérons donc les paramètres réels du futur contexte
|
||||
if (DescribePixelFormat(m_deviceContext, pixelFormat, sizeof(PIXELFORMATDESCRIPTOR), &descriptor) != 0)
|
||||
{
|
||||
parameters.bitsPerPixel = descriptor.cColorBits + descriptor.cAlphaBits;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// 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
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 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/Animation.hpp>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Copyright (C) 2011 Jérôme Leclercq
|
||||
// This file is part of the "Ungine".
|
||||
// For conditions of distribution and use, see copyright notice in Core.h
|
||||
// Copyright (C) 2012 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/AxisAlignedBox.hpp>
|
||||
#include <Nazara/Core/Error.hpp>
|
||||
@@ -55,7 +55,7 @@ void NzAxisAlignedBox::ExtendTo(const NzAxisAlignedBox& box)
|
||||
}
|
||||
|
||||
case nzExtend_Infinite:
|
||||
// Rien à faire
|
||||
// Rien à faire
|
||||
break;
|
||||
|
||||
case nzExtend_Null:
|
||||
@@ -74,11 +74,11 @@ void NzAxisAlignedBox::ExtendTo(const NzVector3f& vector)
|
||||
break;
|
||||
|
||||
case nzExtend_Infinite:
|
||||
// Rien à faire
|
||||
// Rien à faire
|
||||
break;
|
||||
|
||||
case nzExtend_Null:
|
||||
// Nous étendons l'AABB en la construisant de l'origine jusqu'au vecteur
|
||||
// Nous étendons l'AABB en la construisant de l'origine jusqu'au vecteur
|
||||
m_cube.x = 0.f;
|
||||
m_cube.y = 0.f;
|
||||
m_cube.z = 0.f;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 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/Buffer.hpp>
|
||||
@@ -88,7 +88,7 @@ bool NzBuffer::Create(unsigned int length, nzUInt8 typeSize, nzBufferStorage sto
|
||||
{
|
||||
Destroy();
|
||||
|
||||
// On tente d'abord de faire un buffer hardware, si supporté
|
||||
// On tente d'abord de faire un buffer hardware, si supporté
|
||||
if (s_bufferFunctions[storage])
|
||||
{
|
||||
NzBufferImpl* impl = s_bufferFunctions[storage](this, m_type);
|
||||
@@ -113,7 +113,7 @@ bool NzBuffer::Create(unsigned int length, nzUInt8 typeSize, nzBufferStorage sto
|
||||
m_storage = storage;
|
||||
m_usage = usage;
|
||||
|
||||
// Si on arrive ici c'est que tout s'est bien passé.
|
||||
// Si on arrive ici c'est que tout s'est bien passé.
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 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/BufferImpl.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 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/Cursor.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 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/Config.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 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/Icon.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 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/Image.hpp>
|
||||
@@ -84,7 +84,7 @@ bool NzImage::Convert(nzPixelFormat format)
|
||||
unsigned int width = m_sharedImage->width;
|
||||
unsigned int height = m_sharedImage->height;
|
||||
|
||||
// Les images 3D et cubemaps sont stockés de la même façon
|
||||
// Les images 3D et cubemaps sont stockés de la même façon
|
||||
unsigned int depth = (m_sharedImage->type == nzImageType_Cubemap) ? 6 : m_sharedImage->depth;
|
||||
|
||||
for (unsigned int i = 0; i < m_sharedImage->levelCount; ++i)
|
||||
@@ -101,7 +101,7 @@ bool NzImage::Convert(nzPixelFormat format)
|
||||
{
|
||||
NazaraError("Failed to convert image");
|
||||
|
||||
// Nettoyage de la mémoire
|
||||
// Nettoyage de la mémoire
|
||||
delete[] ptr; // Permet une optimisation de boucle (GCC)
|
||||
for (unsigned int j = 0; j < i; ++j)
|
||||
delete[] levels[j];
|
||||
@@ -159,11 +159,11 @@ bool NzImage::Copy(const NzImage& source, const NzCubeui& srcCube, const NzVecto
|
||||
}
|
||||
|
||||
/*
|
||||
Correctif temporaire : Update veut de la mémoire contigüe
|
||||
Il est donc nécessaire de prendre la partie de la texture que nous voulons mettre à jour
|
||||
Correctif temporaire : Update veut de la mémoire contigüe
|
||||
Il est donc nécessaire de prendre la partie de la texture que nous voulons mettre à jour
|
||||
|
||||
FIXME: Trouver une interface pour gérer ce genre de problème (Façon OpenGL?)
|
||||
(Appliquer l'interface à NzTexture également)
|
||||
FIXME: Trouver une interface pour gérer ce genre de problème (Façon OpenGL?)
|
||||
(Appliquer l'interface à NzTexture également)
|
||||
*/
|
||||
nzUInt8 bpp = NzPixelFormat::GetBPP(m_sharedImage->format);
|
||||
unsigned int dstLineStride = srcCube.width*bpp;
|
||||
@@ -269,7 +269,7 @@ bool NzImage::Create(nzImageType type, nzPixelFormat format, unsigned int width,
|
||||
|
||||
for (unsigned int i = 0; i < levelCount; ++i)
|
||||
{
|
||||
// Cette allocation est protégée car sa taille dépend directement de paramètres utilisateurs
|
||||
// Cette allocation est protégée car sa taille dépend directement de paramètres utilisateurs
|
||||
try
|
||||
{
|
||||
levels[i] = new nzUInt8[w * h * d * NzPixelFormat::GetBPP(format)];
|
||||
@@ -1013,7 +1013,7 @@ bool NzImage::Update(const nzUInt8* pixels, const NzRectui& rect, unsigned int z
|
||||
|
||||
bool NzImage::Update(const nzUInt8* pixels, const NzCubeui& cube, nzUInt8 level)
|
||||
{
|
||||
///FIXME: Vérifier que ça fonctionne correctement
|
||||
///FIXME: Vérifier que ça fonctionne correctement
|
||||
#if NAZARA_UTILITY_SAFE
|
||||
if (!IsValid())
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 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/IndexBuffer.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 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/Keyboard.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 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/KeyframeMesh.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 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
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Copyright (C) 2011 Jérôme Leclercq
|
||||
// This file is part of the "Ungine".
|
||||
// For conditions of distribution and use, see copyright notice in Core.h
|
||||
// Copyright (C) 2012 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/Loaders/MD2/Constants.hpp>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Copyright (C) 2011 Jérôme Leclercq
|
||||
// This file is part of the "Ungine".
|
||||
// For conditions of distribution and use, see copyright notice in Core.h
|
||||
// Copyright (C) 2012 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
|
||||
|
||||
#ifndef NAZARA_LOADERS_MD2_CONSTANTS_HPP
|
||||
#define NAZARA_LOADERS_MD2_CONSTANTS_HPP
|
||||
@@ -21,16 +21,16 @@ struct md2_header
|
||||
|
||||
nzUInt32 num_skins; // nombre de skins
|
||||
nzUInt32 num_vertices; // nombre de vertices par frame
|
||||
nzUInt32 num_st; // nombre de coordonnées de texture
|
||||
nzUInt32 num_st; // nombre de coordonnées de texture
|
||||
nzUInt32 num_tris; // nombre de triangles
|
||||
nzUInt32 num_glcmds; // nombre de commandes opengl
|
||||
nzUInt32 num_frames; // nombre de frames
|
||||
|
||||
nzUInt32 offset_skins; // offset données skins
|
||||
nzUInt32 offset_st; // offset données coordonnées de texture
|
||||
nzUInt32 offset_tris; // offset données triangles
|
||||
nzUInt32 offset_frames; // offset données frames
|
||||
nzUInt32 offset_glcmds; // offset données commandes OpenGL
|
||||
nzUInt32 offset_skins; // offset données skins
|
||||
nzUInt32 offset_st; // offset données coordonnées de texture
|
||||
nzUInt32 offset_tris; // offset données triangles
|
||||
nzUInt32 offset_frames; // offset données frames
|
||||
nzUInt32 offset_glcmds; // offset données commandes OpenGL
|
||||
nzUInt32 offset_end; // offset fin de fichier
|
||||
};
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Copyright (C) 2011 Jérôme Leclercq
|
||||
// This file is part of the "Ungine".
|
||||
// For conditions of distribution and use, see copyright notice in Core.h
|
||||
// Copyright (C) 2011 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/Loaders/MD2.hpp>
|
||||
#include <Nazara/Core/Endianness.hpp>
|
||||
@@ -92,8 +92,8 @@ namespace
|
||||
return false;
|
||||
}
|
||||
|
||||
/// Création du mesh
|
||||
// Animé ou statique, c'est la question
|
||||
/// Création du mesh
|
||||
// Animé ou statique, c'est la question
|
||||
bool animated;
|
||||
unsigned int startFrame = NzClamp(parameters.animation.startFrame, 0U, static_cast<unsigned int>(header.num_frames-1));
|
||||
unsigned int endFrame = NzClamp(parameters.animation.endFrame, 0U, static_cast<unsigned int>(header.num_frames-1));
|
||||
@@ -103,7 +103,7 @@ namespace
|
||||
else
|
||||
animated = false;
|
||||
|
||||
if (!mesh->Create((animated) ? nzAnimationType_Keyframe : nzAnimationType_Static)) // Ne devrait pas échouer
|
||||
if (!mesh->Create((animated) ? nzAnimationType_Keyframe : nzAnimationType_Static)) // Ne devrait pas échouer
|
||||
{
|
||||
NazaraInternalError("Failed to create mesh");
|
||||
return false;
|
||||
@@ -129,11 +129,11 @@ namespace
|
||||
NzAnimation* animation = new NzAnimation;
|
||||
if (animation->Create(nzAnimationType_Keyframe, endFrame-startFrame+1))
|
||||
{
|
||||
// Décodage des séquences
|
||||
// Décodage des séquences
|
||||
NzString frameName;
|
||||
|
||||
NzSequence sequence;
|
||||
sequence.framePerSecond = 10; // Par défaut pour les animations MD2
|
||||
sequence.framePerSecond = 10; // Par défaut pour les animations MD2
|
||||
|
||||
char name[16], last[16];
|
||||
stream.SetCursorPos(header.offset_frames + startFrame*header.framesize + offsetof(md2_frame, name));
|
||||
@@ -165,9 +165,9 @@ namespace
|
||||
}
|
||||
name[pos+1] = '\0';
|
||||
|
||||
if (std::strcmp(name, last) != 0) // Si les deux frames n'ont pas le même nom
|
||||
if (std::strcmp(name, last) != 0) // Si les deux frames n'ont pas le même nom
|
||||
{
|
||||
// Alors on enregistre la séquence
|
||||
// Alors on enregistre la séquence
|
||||
sequence.firstFrame = i-numFrames;
|
||||
sequence.lastFrame = i-1;
|
||||
sequence.name = last;
|
||||
@@ -181,7 +181,7 @@ namespace
|
||||
numFrames++;
|
||||
}
|
||||
|
||||
// On ajoute la dernière frame (Qui n'a pas été traitée par la boucle)
|
||||
// On ajoute la dernière frame (Qui n'a pas été traitée par la boucle)
|
||||
sequence.firstFrame = endFrame-numFrames;
|
||||
sequence.lastFrame = endFrame;
|
||||
sequence.name = last;
|
||||
@@ -196,7 +196,7 @@ namespace
|
||||
|
||||
/// Chargement des submesh
|
||||
// Actuellement le loader ne charge qu'un submesh
|
||||
// TODO: Utiliser les commandes OpenGL pour accélérer le rendu
|
||||
// TODO: Utiliser les commandes OpenGL pour accélérer le rendu
|
||||
NzMD2Mesh* subMesh = new NzMD2Mesh(mesh);
|
||||
if (!subMesh->Create(header, stream, parameters))
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Copyright (C) 2011 Jérôme Leclercq
|
||||
// This file is part of the "Ungine".
|
||||
// For conditions of distribution and use, see copyright notice in Core.h
|
||||
// Copyright (C) 2011 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/Loaders/MD2/Mesh.hpp>
|
||||
#include <Nazara/Core/InputStream.hpp>
|
||||
@@ -37,7 +37,7 @@ bool NzMD2Mesh::Create(const md2_header& header, NzInputStream& stream, const Nz
|
||||
std::vector<md2_texCoord> texCoords(header.num_st);
|
||||
std::vector<md2_triangle> triangles(header.num_tris);
|
||||
|
||||
// Lecture des coordonnées de texture
|
||||
// Lecture des coordonnées de texture
|
||||
stream.SetCursorPos(header.offset_st);
|
||||
stream.Read(&texCoords[0], header.num_st*sizeof(md2_texCoord));
|
||||
|
||||
@@ -71,7 +71,7 @@ bool NzMD2Mesh::Create(const md2_header& header, NzInputStream& stream, const Nz
|
||||
md2_frame frame;
|
||||
frame.vertices.resize(header.num_vertices);
|
||||
|
||||
// Pour que le modèle soit correctement aligné, on génère une matrice de rotation que nous appliquerons à chacune des vertices
|
||||
// Pour que le modèle soit correctement aligné, on génère une matrice de rotation que nous appliquerons à chacune des vertices
|
||||
NzMatrix4f rotationMatrix = NzMatrix4f::Rotate(NzEulerAnglesf(90.f, -90.f, 0.f));
|
||||
|
||||
unsigned int stride = s_declaration.GetStride(nzElementStream_VertexData);
|
||||
@@ -94,7 +94,7 @@ bool NzMD2Mesh::Create(const md2_header& header, NzInputStream& stream, const Nz
|
||||
NzByteSwap(&frame.translate.z, sizeof(float));
|
||||
#endif
|
||||
|
||||
m_frames[i].normal = new nzUInt8[m_vertexCount]; // Nous stockons l'indice de la normale plutôt que la normale (gain d'espace)
|
||||
m_frames[i].normal = new nzUInt8[m_vertexCount]; // Nous stockons l'indice de la normale plutôt que la normale (gain d'espace)
|
||||
m_frames[i].vertices = new NzVector3f[m_vertexCount];
|
||||
|
||||
NzVector3f max, min;
|
||||
@@ -128,7 +128,7 @@ bool NzMD2Mesh::Create(const md2_header& header, NzInputStream& stream, const Nz
|
||||
return false;
|
||||
}
|
||||
|
||||
// On avance jusqu'aux premières coordonnées de texture
|
||||
// On avance jusqu'aux premières coordonnées de texture
|
||||
ptr += s_declaration.GetElement(nzElementStream_VertexData, nzElementUsage_TexCoord)->offset;
|
||||
for (unsigned int t = 0; t < header.num_tris; ++t)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 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
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 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
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Copyright (C) 2011 Jérôme Leclercq
|
||||
// This file is part of the "Ungine".
|
||||
// For conditions of distribution and use, see copyright notice in Core.h
|
||||
// Copyright (C) 2012 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/Loaders/PCX.hpp>
|
||||
#include <Nazara/Core/Endianness.hpp>
|
||||
@@ -339,7 +339,7 @@ namespace
|
||||
}
|
||||
|
||||
default:
|
||||
NazaraError("Unable to load " + NzString::Number(bitCount) + " bitcount pcx files");
|
||||
NazaraError("Failed to load " + NzString::Number(bitCount) + " bitcount pcx files");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 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
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Copyright (C) 2011 Jérôme Leclercq
|
||||
// This file is part of the "Ungine".
|
||||
// For conditions of distribution and use, see copyright notice in Core.h
|
||||
// Copyright (C) 2011 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/Loaders/STB.hpp>
|
||||
#include <Nazara/Core/Endianness.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 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/Mesh.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 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/Mouse.hpp>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user