Home

EGLTRUE

EGLTRUE is a nonstandard macro that may appear in some codebases that interface with the EGL API. It is not part of the official Khronos EGL specification, and its meaning is not defined by EGL itself. In standard EGL, boolean values are represented by the EGLBoolean type and the macros EGL_TRUE and EGL_FALSE, typically defined as 1 and 0.

The presence of EGLTRUE usually stems from project-specific conventions. Some codebases define EGLTRUE as 1, while

Portability and compatibility considerations are important with EGLTRUE. Since it is not guaranteed to be defined

In practice, if EGLTRUE is encountered, it is prudent to locate its definition in the codebase and

See also: EGL, EGL_TRUE, EGL_FALSE, EGLBoolean.

others
define
it
as
an
alias
to
EGL_TRUE,
for
example
by
writing
a
local
definition
such
as
#define
EGLTRUE
EGL_TRUE.
The
goal
is
to
improve
readability
or
to
maintain
compatibility
with
older
code
that
used
a
different
naming
convention.
by
the
EGL
headers,
code
that
uses
EGLTRUE
may
fail
to
compile
on
platforms
or
toolchains
that
do
not
provide
the
local
definition.
To
maximize
portability,
developers
are
generally
advised
to
rely
on
the
official
EGL_TRUE
macro
and
the
EGLBoolean
type
rather
than
introducing
nonstandard
aliases.
ensure
it
aligns
with
EGL_TRUE
to
avoid
inconsistencies.
Otherwise,
replacing
EGLTRUE
with
EGL_TRUE
can
help
maintain
compatibility
with
the
EGL
specification
and
with
other
libraries
that
interact
with
EGL.