The only hint I can provide is from here:
https://groups.google.com/d/msg/pyqtgraph/FNxcMh3M6nc/XGS2C447n_MJIt works for me but I don't know how to add multiple text instances, if you or any one knows, thanks to help!
Here is a simple working example based on the above:
import pyqtgraph.opengl as gl
import pyqtgraph as pg
from pyqtgraph.Qt import QtCore as pqc
from pyqtgraph.Qt import QtGui as pqg
class MyGLView(gl.GLViewWidget):
def __init__(self, X,Y,Z,text):
super(MyGLView, self).__init__()
self.text = text
self.X = X
self.Y = Y
self.Z = Z
def setText(self, text):
self.text = text
self.update()
def setX(self, X):
self.X = X
self.update()
def setY(self, Y):
self.Y = Y
self.update()
def setZ(self, Z):
self.Z = Z
self.update()
def paintGL(self, *args, **kwds):
gl.GLViewWidget.paintGL(self, *args, **kwds)
self.qglColor(Qt.white)
self.renderText(self.X, self.Y, self.Z, self.text)
app = pqg.QApplication([])
w = MyGLView(X=0,Y=5,Z=0,text="Your text")
g = gl.GLGridItem()
w.addItem(g)
w.show()
if __name__ == '__main__':
pqg.QApplication.instance().exec_()
Ludovic