Maniphest T81784

2D Gizmo glitch when using glEnable/glDisable (Blender 2.91)
Closed, ResolvedBUG

Assigned To
Clément Foucault (fclem)
Authored By
dima glib (dairin0d)
Oct 16 2020, 10:40 PM
Tags
  • BF Blender
  • EEVEE & Viewport
  • Python API
Subscribers
Clément Foucault (fclem)
dima glib (dairin0d)
Philipp Oeser (lichtwerk)

Description

System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce RTX 2070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 432.00

Blender Version
Broken: version: 2.91.0 Alpha, branch: master, commit date: 2020-10-15 21:02, hash: rBba8233174cd7
Worked: 2.90.1
This is probably an issue with rBf12b0373f322: BGL: Workaround broken bgl usage caused by GPU refactor -- it started being an issue with rBd39043b5ae05: Revert "Revert "BGL: Workaround broken bgl usage caused by GPU refactor"" again

Short description of error
If a GizmoGroup is 2D (doesn't have '3D' in bl_options), any glEnable/glDisable calls during dizmo drawing will result in the glitch (at least for me, the 3D viewport turns black, and the navigation gizmos lose their text/icons).

Exact steps for others to reproduce the error

  1. Open the default scene in Blender 2.91
  2. Run the attached script (it will register a gizmo for Light objects)
  3. Select the light
  4. The 3D viewport will turn black

Revisions and Commits

rB Blender

Related Objects

Mentioned Here
T80730: BGL deprecation
rBf12b0373f322: BGL: Workaround broken bgl usage caused by GPU refactor
rBd39043b5ae05: Revert "Revert "BGL: Workaround broken bgl usage caused by GPU refactor""

Event Timeline

dima glib (dairin0d) created this task.Oct 16 2020, 10:40 PM
Philipp Oeser (lichtwerk) changed the task status from Needs Triage to Confirmed.Oct 18 2020, 4:42 PM
Philipp Oeser (lichtwerk) triaged this task as High priority.
Philipp Oeser (lichtwerk) changed the subtype of this task from "Report" to "Bug".
Philipp Oeser (lichtwerk) added projects: EEVEE & Viewport, Python API.
Philipp Oeser (lichtwerk) added subscribers: Clément Foucault (fclem), Philipp Oeser (lichtwerk).

Can confirm, this is probably an issue with rBf12b0373f322: BGL: Workaround broken bgl usage caused by GPU refactor -- it started being an issue with rBd39043b5ae05: Revert "Revert "BGL: Workaround broken bgl usage caused by GPU refactor"" again

@Clément Foucault (fclem): I know there has been quite some work on BGL etc., dont see glEnable/glDisable mentioned in T80730: BGL deprecation though, nor documented that this usage needs to be tweaked in 2.91?
So: looks like a bug to me, will set to High prio (really think we should keep the bgl API working, there are potentionally lots of Addons using this)

Philipp Oeser (lichtwerk) updated the task description.Oct 18 2020, 4:42 PM
Clément Foucault (fclem) claimed this task.Oct 21 2020, 5:40 PM
Clément Foucault (fclem) closed this task as Resolved by committing rB5a65305f8998: Fix T81784 BGL: Gizmo glitch when using glEnable/glDisable.Oct 22 2020, 1:20 AM
Clément Foucault (fclem) added a commit: rB5a65305f8998: Fix T81784 BGL: Gizmo glitch when using glEnable/glDisable.