Big config/debug update

Added config checkers
Macro no longer use suffixes
Moved MemoryManager to upper directory
Renamed *_MEMORYMANAGER to *_MANAGE_MEMORY
Renamed AUDIO_STREAMEDBUFFERCOUNT to AUDIO_STREAMED_BUFFER_COUNT
Renamed CORE_REAL_PRECISION to CORE_DECIMAL_DIGITS
Renamed DEBUG_MEMORYMANAGER_DISABLE_REDEFINITION to
DEBUG_NEWREDEFINITION_DISABLE_REDEFINITION
Renamed GRAPHICS_MAX_LIGHTPERPASS to GRAPHICS_MAX_LIGHT_PER_PASS
Renamed UTILITY_FORCE_DECLARATION_STRIDE_MULTIPLE_OF_32 to
UTILITY_VERTEX_DECLARATION_FORCE_STRIDE_MULTIPLE_OF_32


Former-commit-id: 81ef836ac9f092ac471f60e544bb7c7c6370593c
This commit is contained in:
Lynix
2014-07-08 10:56:37 +02:00
parent f819beb747
commit c4b10dddda
64 changed files with 471 additions and 206 deletions

View File

@@ -1,5 +1,5 @@
/*
Nazara Engine - Window module
Nazara Engine - Utility module
Copyright (C) 2014 Jérôme "Lynix" Leclercq (Lynix680@gmail.com)
@@ -29,11 +29,8 @@
/// Chaque modification d'un paramètre du module nécessite une recompilation de celui-ci
// Force les buffers à posséder un stride multiple de 32 bytes (Gain de performances sur certaines cartes/plus de consommation mémoire)
#define NAZARA_UTILITY_FORCE_DECLARATION_STRIDE_MULTIPLE_OF_32 0 ///FIXME: Ne peut pas être utilisé pour l'instant
// Utilise un manager de mémoire pour gérer les allocations dynamiques (détecte les leaks, ralenti l'exécution)
#define NAZARA_UTILITY_MEMORYMANAGER 0
// Utilise un manager de mémoire pour gérer les allocations dynamiques (détecte les leaks au prix d'allocations/libérations dynamiques plus lentes)
#define NAZARA_UTILITY_MANAGE_MEMORY 0
// Le skinning doit-il prendre avantage du multi-threading ? (Boost de performances sur les processeurs multi-coeurs)
#define NAZARA_UTILITY_MULTITHREADED_SKINNING 0
@@ -50,7 +47,13 @@
// Protège les classes des accès concurrentiels
//#define NAZARA_UTILITY_THREADSAFE 1
// Force les buffers à posséder un stride multiple de 32 bytes (Gain de performances sur certaines cartes/plus de consommation mémoire)
#define NAZARA_UTILITY_VERTEX_DECLARATION_FORCE_STRIDE_MULTIPLE_OF_32 0 ///FIXME: Ne peut pas être utilisé pour l'instant
// Sous Windows, fait en sorte que les touches ALT et F10 n'activent pas le menu de la fenêtre
#define NAZARA_UTILITY_WINDOWS_DISABLE_MENU_KEYS 1
/// Vérification des valeurs et types de certaines constantes
#include <Nazara/Utility/ConfigCheck.hpp>
#endif // NAZARA_CONFIG_UTILITY_HPP

View File

@@ -0,0 +1,23 @@
// Copyright (C) 2014 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
#ifndef NAZARA_CONFIG_CHECK_UTILITY_HPP
#define NAZARA_CONFIG_CHECK_UTILITY_HPP
/// Ce fichier sert à vérifier la valeur des constantes du fichier Config.hpp
#include <type_traits>
#define CheckTypeAndVal(name, type, op, val, err) static_assert(std::is_ ##type <decltype(name)>::value && name op val, #type err)
// On force la valeur de MANAGE_MEMORY en mode debug
#if defined(NAZARA_DEBUG) && !NAZARA_UTILITY_MANAGE_MEMORY
#undef NAZARA_UTILITY_MANAGE_MEMORY
#define NAZARA_UTILITY_MANAGE_MEMORY 1
#endif
CheckTypeAndVal(NAZARA_UTILITY_SKINNING_MAX_WEIGHTS, integral, >, 0, " shall be a strictly positive integer");
#endif // NAZARA_CONFIG_CHECK_UTILITY_HPP

View File

@@ -3,6 +3,6 @@
// For conditions of distribution and use, see copyright notice in Config.hpp
#include <Nazara/Utility/Config.hpp>
#if NAZARA_UTILITY_MEMORYMANAGER || defined(NAZARA_DEBUG)
#include <Nazara/Core/Debug/MemoryManager.hpp>
#if NAZARA_UTILITY_MANAGE_MEMORY
#include <Nazara/Core/Debug/NewRedefinition.hpp>
#endif

View File

@@ -2,7 +2,8 @@
// This file is part of the "Nazara Engine - Utility module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#if NAZARA_UTILITY_MEMORYMANAGER || defined(NAZARA_DEBUG)
// On suppose que Debug.hpp a déjà été inclus, tout comme Config.hpp
#if NAZARA_UTILITY_MANAGE_MEMORY
#undef delete
#undef new
#endif