mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 17:35:36 +00:00
gpu: saturate instead of overflowing depth buffer
Use greater-than-or-equal test and saturate the z depth buffer when more than 65k objects are drawn. Fixes gio#127 Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -399,6 +399,8 @@ func (b *Backend) DepthFunc(f backend.DepthFunc) {
|
||||
switch f {
|
||||
case backend.DepthFuncGreater:
|
||||
glfunc = GREATER
|
||||
case backend.DepthFuncGreaterEqual:
|
||||
glfunc = GEQUAL
|
||||
default:
|
||||
panic("unsupported depth func")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user