It's quite poorly documented. All that needs to be done is create a context class and set its sg
field, like so:
def MyContext(BaseContext):
def OnInit(self):
self.sg = ... load your scene graph here ...
def OnRender(self, mode):
return
And that's it, the scene is rendered properly.