This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
renderer_identification [2019/08/26 03:18] – korshun | renderer_identification [2019/08/26 03:53] – korshun | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Renderer | + | ====== Renderer |
===== Introduction ===== | ===== Introduction ===== | ||
- | You can identify | + | You can detect |
<note warning> | <note warning> | ||
Line 10: | Line 10: | ||
* don't just check for '' | * don't just check for '' | ||
* don't just use [[source_port_identification|IsGZDoom]] and assume that if the engine is GZDoom, the user is playing in OpenGL renderer. | * don't just use [[source_port_identification|IsGZDoom]] and assume that if the engine is GZDoom, the user is playing in OpenGL renderer. | ||
- | * don't store the value of '' | ||
* don't check the renderer serverside -- the server has no renderer. | * don't check the renderer serverside -- the server has no renderer. | ||
+ | |||
+ | Nonetheless, | ||
</ | </ | ||
===== IsOpenGL ===== | ===== IsOpenGL ===== | ||
- | '' | + | '' |
+ | |||
+ | If called serverside, '' | ||
+ | |||
+ | <note important> | ||
+ | This function will return an incorrect value if '' | ||
+ | </ | ||
- | <note tip>The renderer can change mid-game. Don't store the result of '' | ||
===== How it works ===== | ===== How it works ===== | ||
+ | |||
+ | This functions first calls [[client_server_detection|IsClient]] to see if it's running on a client (see above). | ||
+ | |||
+ | If it's running on a client, it calls [[port_detection|IsGZDoom]] to check if the port is GZDoom or a derivative like Zandronum. If the port is not a GZDoom derivative, it can't have the OpenGL renderer, and this function returns false. This is to prevent detecting the OpenGL renderer when ZDoom is run with a config from GZDoom which has '' | ||
+ | |||
+ | If the port is confirmed to be a GZDoom derivative, this function checks for two CVars: '' | ||
+ | |||