Skip to content

Commit ecf7023

Browse files
committed
[GL] Fix issue with clearing textures with unsigned integer formats
1 parent adf99d8 commit ecf7023

3 files changed

Lines changed: 808 additions & 795 deletions

File tree

RELEASE_NOTES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
- Implemented download / upload for PixImage as 3D slices
33
- Improved support for non-2D framebuffer outputs
44
- [GL] Create debug context when debug output is enabled
5+
- [GL] Fixed issue with clearing textures with unsigned integer formats
56

67
### 5.6.1
78
- [GeometryPool] culling shader workaround (FShade write bug)

src/Aardvark.Rendering.GL/Runtime/RenderTasks.fs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,10 @@ module RenderTasks =
207207
match values.[att.Name] with
208208
| Some c ->
209209
if att.Format.IsIntegerFormat then
210-
GL.ClearBuffer(ClearBuffer.Color, i, c.Integer.ToArray())
210+
if att.Format.IsSigned then
211+
GL.ClearBuffer(ClearBuffer.Color, i, c.Integer.ToArray())
212+
else
213+
GL.ClearBuffer(ClearBuffer.Color, i, c.Integer.ToV4ui().ToArray())
211214
else
212215
GL.ClearBuffer(ClearBuffer.Color, i, c.Float.ToArray())
213216
GL.Check "could not clear buffer"

0 commit comments

Comments
 (0)