nextFrame only works from when python is the scene script. There are no examples and is no documentation on this, but if you create a scene property “main” and make it’s value a python script, the script will be executed upon game start, then nextFrame() will work.
I recall trying to put renderToTexture into a predraw callback without success. Or maybe that was ImageMirror(). Give it a try:
print("Running just before drawing, after physics and motion etc.")
Be aware that accessing objects may do weird things. Interacting with sensors and actuators (Eg trying to set parameters) will fail. There is no bge.logic.getCurrentController() and a few other funny things.
I would be interested in a direct comparison between a down-sampled render-to-texture bloom and a full resolution 2D filter bloom. I suspect the 2D filter would win by virtue of not needing to render the scene twice. But then I suppose O(n) (number of pixels drawn using RTT) vs O(n^2) (number of pixels processed in 2D filter) says that the render-to-texture may be slightly faster, so long as the overhead isn’t too great.