by _mental_ » Sun Dec 16, 2018 2:03 am
I tested on macOS with Intel and NVIDIA graphics. Although, I don't think it's related to hardware at all.
With unsigned
index, i.e. before compilation warning fix,
FLightBuffer::DoBindUBO() is never called. This means no glitch.
Apparently, 2^32-1 is greater than -1. Probably, different compilers can handle such comparison differently.
With signed
index the mentioned function is called several times per frame. The glitch is now visible.
That's why I was asking how this is suppose to work.
I tested on macOS with Intel and NVIDIA graphics. Although, I don't think it's related to hardware at all.
With unsigned [b]index[/b], i.e. before compilation warning fix, [url=https://github.com/coelckers/gzdoom/blob/c92e6b03ac461ac16c13412ae414332145e60081/src/hwrenderer/dynlights/hw_lightbuffer.h#L53]FLightBuffer::DoBindUBO()[/url] is never called. This means no glitch.
Apparently, 2^32-1 is greater than -1. Probably, different compilers can handle such comparison differently.
With signed [b]index[/b] the mentioned function is called several times per frame. The glitch is now visible.
That's why I was asking how this is suppose to work.