Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 4 of 4 FirstFirst ... 234
Results 31 to 32 of 32

Thread: this glsl 1.3 thing

  1. #31
    Junior Member Regular Contributor
    Join Date
    Mar 2007
    Location
    Latvia
    Posts
    225

    Re: this glsl 1.3 thing

    Quote Originally Posted by bakura
    But how the hell can we know in which texture data is written.
    GL3.0 spec says it clearly Read section 3.12.2 Shader Outputs.

    You bind output variables from fragment shader with glBindFragDataLocation before linking your program:
    Code :
    glBindFragDataLocation(programId, 0, "myVec41");
    glBindFragDataLocation(programId, 1, "myVec42");
    glLinkProgram(programId);
    This means myVec41 will go to first draw buffer and myVec42 will go to second. You specifiy draw buffers with glDrawBuffers function.

  2. #32
    Junior Member Newbie
    Join Date
    May 2008
    Posts
    12

    Re: this glsl 1.3 thing

    Oh yes, this is because I only read GLSL specs... Thank you . I'll read the whole OpenGL 3.0 specs too.

Posting Permissions

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