Strange drawing on Debian 10

hello! title says it all. i have been using openFrameworks for a couple of months, sticking mostly to 2d drawing or 3d wireframes without any lighting. today i started a fresh project and decided to experiment with ofLight.

i used ofDrawSphere to put a sphere in the middle of the screen, and moved it along the Z axis (-300 to 300), with an ofLight point light at 0,0. it produced this:

2020-03-07-103805_1920x1848_scrot 2020-03-07-103813_1920x1848_scrot

i have noticed some screen tearing and other minor graphical glitches when using drawing in 2d, but it hasn’t been anything worth posting about until now. i have a feeling its something related to the setup of my system rather than oF, but i wasn’t sure where else to ask for help!

if anyone could point me in the right direction to fix this strange drawing, it would be greatly appreciated.

thank you :slight_smile:

you need to use depth testing to draw in 3d usually. at the beginning of your draw function add:


if you later want to draw in 2d, leaving depth testing enabled might be problematic so you should disable it before doing so with:


thank you @arturo! not sure how I missed that… worked a charm :slight_smile: