PDA

View Full Version : shader passing and rendering texture huge problem



Krzycho_666
01-06-2013, 07:09 PM
I'm fighting with some stupidly easy problem. I can't get passing and rendering texture by shader working. After passing existing, complete texture ( I tried dozens of them, loaded in various ways... always same effect ), and rendering it even with the easiest way on quad, I got solid color filled one. The funniest thing is, that the color is picked from the attached texture - usually from point (1,1) - in normalised coords.
Here's some more info and code fragment:

stackoverflow.com/questions/14186799/glsl-shader-passing-and-rendering-texture#comment19664636_14186799

Please... help! I try to fix it for a couple of days now! I need to have it workin as soon as possible... unfortunately :/
Thanks in advance for any ideas here.

tonyo_au
01-07-2013, 02:26 AM
Try binding and setting your texture after you activate the shader ( I assume program->begin() activates the shader)

Krzycho_666
01-07-2013, 09:01 PM
Nope... that wasn't the problem... I just forgot to put texCoords when was drawing the full screen post effect quad ( the first one in my code) ... Yep... that was it!
I was looking for long hours for some hardcore bugs in my code, in spite of looking for some ease one first...
My friend found it after 5min of looking on my code.. :sleeping: but thank you anyway for precious help! :o