Good morning everyone,
My problem is with shaders. Especially gradients. I've made a couple of them and they work fine, as long as the gradient is horizontal. If I try to make it vertical, it's just a plain color (the ending one of the gradient).
Code:
The gradient shader: https://github.com/gjkf/seriousEngine/blob/master/src/main/resources/shaders/gradient.glsl
The shader renderer: https://github.com/gjkf/seriousEngine/blob/master/src/main/java/com/gjkf/seriousEngine/core/render/Renderer.java#L269-L352 (Note that I pass some uniforms as an HashMap and that works)
And finally where I draw: https://github.com/gjkf/seriousEngine/blob/master/src/main/java/com/gjkf/seriousEngine/core/render/Renderer.java#L269-L335
I think that should be all. I know it's a lot but I'm really struggling with these.
If you need anything else, feel free to ask.
Thanks for your time.
EDIT: I've added a couple of more problems I have, sorry :(
EDIT: I've solved the Image one, the other 2 still persist.
EDIT: I've solved the Font one, the Shader still causes problems.
The drawText method calls glPushMatrix() twice but glPopMatrix() only once.
Thanks for the tip but still not works. The problem persists and nothing really changed.