CrystalSpace

Public API Reference

Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

iGLDriverDatabase Struct Reference

Interface to read custom GL driver databases. More...

#include <csplugincommon/iopengl/driverdb.h>

Inheritance diagram for iGLDriverDatabase:

iBase List of all members.

Public Member Functions

void ReadDatabase (iDocumentNode *dbRoot, int configPriority=iConfigManager::ConfigPriorityPlugin+20, const char *phase=0)
 Read a custom driver database.

Detailed Description

Interface to read custom GL driver databases.

While in a perfect world the rendering would behave, succeed and fail on every OpenGL implementation the same way, the actual reality requires working around quirks and problems in OpenGL drivers and versions thereof. CS provides the so-called "driver database" (/config/glshader.xml) which contains configuration settings to work around known issues for certain drivers. It contains settings that are suitable an out-of-the-box CrystalSpace; however, if an application employs advanced renderer features (such as complex custom shaders), it may be desireable to provide driver-dependent tweaks for this custom content as well. For this purpose this interface is provided.

Remarks:
If you wanted to load CS' own driver database with this interface, the following code fragment will give you a rough idea on how to achieve that:
 csRef<iGLDriverDatabase> driverDB = 
  scfQueryInterface<iGLDriverDatabase> (graphics2D);
 if (driverDB.IsValid())
 {
   csRef<iFile> dbFile = VFS->Open ("/config/gldrivers.xml", VFS_FILE_READ);
   csRef<iDocument> dbDocument = documentSystem->CreateDocument();
   dbDocument->Parse();
   csRef<iDocumentNode> dbRoot = doc->GetRoot()->GetNode ("gldriverdb");
   driverDB->ReadDatabase (dbRoot);
 }

Definition at line 59 of file driverdb.h.


Member Function Documentation

void iGLDriverDatabase::ReadDatabase iDocumentNode dbRoot,
int  configPriority = iConfigManager::ConfigPriorityPlugin+20,
const char *  phase = 0
 

Read a custom driver database.

Parameters:
dbRoot Document node containing the <configs> and <rules> nodes required by the driver DB as children.
configPriority Priority with which the individual tweaks are added to the configuration manager.
phase Simple rule filter; only rules whose "phase" attribute match this string are considered. 0 and an empty string are equivalent.


The documentation for this struct was generated from the following file:
Generated for Crystal Space by doxygen 1.4.4