Renderer identification

Introduction

You can identify whether the software or OpenGL renderer is currently being used by calling IsOpenGL.

Things not to do: don't just check GetCVar(“vid_renderer”) – the user may also have gl_nogl set to true. don't just check for vid_renderer and gl_nogl – the user may be playing in ZDoom, which doesn't have the OpenGL renderer. don't just use IsGZDoom and assume that if the engine is GZDoom, the user is playing in OpenGL renderer. don't store the value of IsOpenGL in a variable – the renderer can change mid-game. don't check the renderer serverside – the server has no renderer.

IsOpenGL

bool IsOpenGL() – returns true if the mod is being played in the OpenGL renederer, false if software renderer.

The renderer can change mid-game. Don't store the result of IsOpenGL in a variable. Instead, simply call it every time.