This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| engine_info [2019/04/21 21:23] – korshun | engine_info [2019/08/26 01:13] (current) – removed korshun | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Engine information ====== | ||
| - | |||
| - | ACSUtils provides functions to identify the exact source port (ZDoom, GZDoom, Zandronum) and renderer (software, OpenGL). | ||
| - | |||
| - | ===== Identifying source port ===== | ||
| - | |||
| - | ==== Detection method ==== | ||
| - | |||
| - | The detection module first checks for presence of [[zan> | ||
| - | |||
| - | If the port is not Zandronum, the detection module attempts to spawn an actor of type [[zdoom> | ||
| - | |||
| - | If both these checks fail, the port is assumed to be ZDoom. | ||
| - | |||
| - | ==== Caching ==== | ||
| - | |||
| - | The above checks are not rerun every time the source port is queried. After identification, | ||
| - | |||
| - | ==== IdentifySourcePort ==== | ||
| - | '' | ||
| - | |||
| - | Identifies the engine that the mod is running in and returns one of the following constants: | ||
| - | * '' | ||
| - | * '' | ||
| - | * '' | ||
| - | |||
| - | ==== IsGZDoom ==== | ||
| - | '' | ||
| - | |||
| - | Returns true if the port is GZDoom or a derivative. | ||
| - | |||
| - | <note important> | ||
| - | <note tip>If you want to check for OpenGL renderer, don't use this function. Use '' | ||
| - | |||
| - | ==== IsZandronum ==== | ||
| - | '' | ||
| - | |||
| - | Returns true if the port is Zandronum or a derivative. | ||
| - | |||
| - | ==== GetPortName ==== | ||
| - | '' | ||
| - | |||
| - | Returns the name of the source port as a string, one of ''" | ||
| - | |||
| - | === Example usage === | ||
| - | |||
| - | < | ||
| - | print(s:" | ||
| - | </ | ||
| - | |||
| - | |||
| - | ===== Identifying renderer ===== | ||
| - | |||
| - | ==== IsOpenGL ==== | ||
| - | '' | ||
| - | |||
| - | Returns true if the engine is currently running in an OpenGL renderer. | ||
| - | |||
| - | <note important> | ||
| - | |||
| - | === Detection method === | ||
| - | |||
| - | This function first calls '' | ||
| - | |||
| - | If the port is confirmed to be a GZDoom derivative, this function checks for two CVars: '' | ||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||