![]() |
Public API Reference |
![]() |
Interface to read custom GL driver databases. More...
#include <csplugincommon/iopengl/driverdb.h>
Public Member Functions | |
void | ReadDatabase (iDocumentNode *dbRoot, int configPriority=iConfigManager::ConfigPriorityPlugin+20, const char *phase=0) |
Read a custom driver database. |
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 Crystal Space; 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.
csRef<iOpenGLDriverDatabase> driverDB = scfQueryInterface<iOpenGLDriverDatabase> (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.
void iOpenGLDriverDatabase::ReadDatabase | ( | iDocumentNode * | dbRoot, |
int | configPriority = iConfigManager::ConfigPriorityPlugin+20 , |
||
const char * | phase = 0 |
||
) |
Read a custom driver database.
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. |
Reimplemented in csGraphics2DGLCommon.