Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: shader passing and rendering texture huge problem

Hybrid View

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2013
    Posts
    2

    Unhappy shader passing and rendering texture huge problem

    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.

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jan 2012
    Location
    Australia
    Posts
    1,101
    Try binding and setting your texture after you activate the shader ( I assume program->begin() activates the shader)

  3. #3
    Junior Member Newbie
    Join Date
    Jan 2013
    Posts
    2
    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.. but thank you anyway for precious help!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •