Edit: Got it working! Thank you for guiding me through it all.
Thanks for the quick fix and all you help so far! I've actually stated working on my own shader that I've passed explicitly to my class that implements IRenderHook, just as you've suggested (Now I can use the new method you've added instead, which is more flexible).
I have a few more question though:
1) I what stage repeatRendering() is called? Is it after the object was drawn to the framebuffer or before?
2) If several objects share the same instance of the same IRenderHook, is it guaranteed that each object would execute "beforeRendering()->repeatRendering()->afterRendering()" synchronously, or is it asynchronous, that is, under some conditions is it possible that (for instance) between repeatRendering and afterRendering of object A, object B will call beforeRendering or repeatRendering?
Again, thank you so much for your help.
Thanks for the quick fix and all you help so far! I've actually stated working on my own shader that I've passed explicitly to my class that implements IRenderHook, just as you've suggested (Now I can use the new method you've added instead, which is more flexible).
I have a few more question though:
1) I what stage repeatRendering() is called? Is it after the object was drawn to the framebuffer or before?
2) If several objects share the same instance of the same IRenderHook, is it guaranteed that each object would execute "beforeRendering()->repeatRendering()->afterRendering()" synchronously, or is it asynchronous, that is, under some conditions is it possible that (for instance) between repeatRendering and afterRendering of object A, object B will call beforeRendering or repeatRendering?
Again, thank you so much for your help.