I’m new to cocos2d-x (and game programming as a whole).
I’m trying to learn shader programming and without going into unnecessary details, I want to update the uniform vars of my shader using glUniform1f before I draw each sprite. That’s one glUniform1f() call before each sprite draw.
cocos2d-x 3 introduced a render queue. How can I force what I need in the render queue? I tried using a CustomCommand but after reading through Renderer::render() I found that CustomCommands are executed right away whereas QuadCommands are added to another queue. This would mess up the order.
How can I ensure a glUniform1f() right before each draw?
Thanks in advance.