#include <Declaration.h>
Inheritance diagram for NSMeshes::TDeclarationManager:
Public Member Functions | |
BOOL | Initialize (void) |
This method loads all declarations according to configuration TGlobalsSystem::GetConfiguration(). | |
TDeclaration * | GetDeclaration (const DWORD &vertexTypeNumber) |
This method returns declaration from specified file. | |
Static Public Member Functions | |
static TDeclarationManager * | CreateDeclarationManager (TRenderer *renderer) |
Creates manager for vertex declarations. | |
static void | DestroyDeclarationManager (TDeclarationManager *manager) |
Destroys manager for vertex declarations. |
Application defines required vertex declarations in global configuration file via numbers. Number of file must be identical with vertex type. Vertex types are listed in MODELING/MESH.TXT.
Declaration manager must load all declarations when application is initialized. After it application may get vertex declarations via their numbers. If there is no specified vertex declarations then NULL is returned. You load declarations via method TDeclarationManager::Initialize().
Because vertex declaration is small renderer resource there isn't problem with memory. Thus when number of references reaches to zero declarations isn't destroyed. Vertex declarations are destroyed either when manager is destroyed or via special method. Application should always carefully use Release method - it may useful for debugging purposes etc.
Definition at line 201 of file Declaration.h.
|
Creates manager for vertex declarations. Returns NULL if an error occured.
Definition at line 310 of file Declaration.cpp. References TGlobalsSystem::GetLogFile(), Initialize(), and NSMath::NSStdMath::log(). Here is the call graph for this function: ![]() |
|
Destroys manager for vertex declarations. Destroyed manager should have no referenced declarations.
Definition at line 339 of file Declaration.cpp. References TGlobalsSystem::GetLogFile(), and NSMath::NSStdMath::log(). Here is the call graph for this function: ![]() |
|
This method returns declaration from specified file.
Definition at line 458 of file Declaration.cpp. References TArrayPtrs< T, size, step >::GetSize(). Here is the call graph for this function: ![]() |
|
This method loads all declarations according to configuration TGlobalsSystem::GetConfiguration(). Method use section "graphic-declarations" in config file, where each item has format: "number" = "file_with_declaration" where number must be greater than or equal to zero and its determines vertex type specified in MODELING/MESH.TXT.
Definition at line 368 of file Declaration.cpp. References TArrayPtrs< T, size, step >::AddItem(), TString::c_str(), TArrayPtrs< T, size, step >::Clear(), DBGASSERT_GRAPHICLOW, FALSE, TGlobalsSystem::GetConfiguration(), TGlobalsSystem::GetLogFile(), NSConfigFile::TConfigFileSection::GetName(), NSConfigFile::TConfigFile::GetSection(), NSConfigFile::TConfigFileSection::GetSize(), NSConfigFile::TConfigFileSection::GetValue(), NSMeshes::TDeclaration::LoadDeclaration(), NSMath::NSStdMath::log(), TArrayPtrs< T, size, step >::Size(), and TString::ToInt(). Referenced by CreateDeclarationManager(). Here is the call graph for this function: ![]() |