OpenGL is not convenient to draw text, then I want to paint a text in opengl context mixing using qt painter. From the qt document, if we want to using painter in opengl context, it will default disable depth test,
so the text in the back of the model will be painted in the front, like that:
I want to draw model like this::
My code like that:
please help me how to enable depth test to avoid drawing the text behind of the object to the front.