ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


functions:isopengl

This is an old revision of the document!


IsOpenGL

bool IsOpenGL()

Description

Returns true if the OpenGL renderer is being used by the client, false if software.

When used serverside, this function always returns true and emits a ProgramError.

It works by checking the following conditions:

  1. The mod is being played in a GZDoom-based port (see IsGZDoom).
  2. vid_renderer is true.
  3. gl_nogl is false.

Only if all three checks pass, the function returns true.

This function will return an incorrect value if vid_renderer or gl_nogl is changed mid-game because the renderer only actually switches after restart, but the values of the cvars change instantly.
functions/isopengl.1489781836.txt.gz ยท Last modified: 2017/03/17 22:17 by korshun