The code for this is handy to know ( taken from ShowBase.py )…
"""enableSoftwareMousePointer(self)
Creates some geometry and parents it to render2d to show
the currently-known mouse position. Useful if the mouse
pointer is invisible for some reason.
"""
mouseViz = self.render2d.attachNewNode('mouseViz')
lilsmiley = loader.loadModel('lilsmiley')
lilsmiley.reparentTo(mouseViz)
aspectRatio = self.getAspectRatio()
# Scale the smiley face to 32x32 pixels.
lilsmiley.setScale(
32.0 / self.win.getHeight() / aspectRatio,
1.0, 32.0 / self.win.getHeight())
If you will use a similar scale, then remember to change the self.win to base.win