 <p>The text rendering code is probably disabling the depth test and your cube drawing code doesn't (re-)enable it.</p> <p>The line</p> <pre><code>gloo.set_state(clear_color=(0.30, 0.30, 0.35, 1.00), depth_test=True) </code></pre> <p>does enable depth testing, but its set only in the constructor. Here's an important rule (speak with me): There is no "initialization" in OpenGL. There's just state, which must be set when needed, right before it's needed to what it is needed to be. Add this</p> <p>right before the cube triangle drawing code, i.e.</p> <p>def on_draw(self, event): gloo.clear(color=True, depth=True) self.testText.draw(self.tr_sys) #draw text</p> <pre><code> gloo.set_state(depth_test=True) self.program.draw('triangles', self.indices) #draw the cube </code></pre>