-
Hello. I am reading through the code and noticed the following branch condition: Line 2616 in 2a6bd97 While |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
@Hexaflex Actually, it looks like a bug! Good catch! Reviewed! |
Beta Was this translation helpful? Give feedback.
-
This looks like a tricky way to avoid I just compiled a small program using That's a beautiful hack. A better solution might be to declare a |
Beta Was this translation helpful? Give feedback.
-
Hah, interesting. Thanks for the input. |
Beta Was this translation helpful? Give feedback.
This looks like a tricky way to avoid
UINT_MAX
(fromlimits.h
) whenglInternalFormat
might be a different unsigned size thanunsigned int
and the max value is some sort of flag case.I just compiled a small program using
cl.exe
with no options and that is exactly what happens. I assigned-1
tounsigned int glInternalFormat
and the comparison!= -1
failed and comparison withUINT_MAX
succeeded.That's a beautiful hack. A better solution might be to declare a
const
(better than#define
) with the intended value and a big XXX comment with it, all inrlgl.h