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 2 of 2

Thread: What is source-string-number ?

Hybrid View

  1. #1
    Junior Member Newbie
    Join Date
    Oct 2013
    Posts
    13

    What is source-string-number ?

    Trying to use #line directive in GLSL, in the manual it says #line can have source-string-number. Don't know exactly what it is
    I guess you can assign a number to a shader, but in that case, how can I fetch it in the program ?

    Also didn't find anything useful in the documentation, could someone give me a hint on this ?

  2. #2
    Member Regular Contributor
    Join Date
    Jun 2013
    Posts
    474
    Quote Originally Posted by septag View Post
    Trying to use #line directive in GLSL, in the manual it says #line can have source-string-number. Don't know exactly what it is
    It's an integer constant containing the (zero-based) index of the current source string in the array of strings passed as the string parameter to glShaderSource(). It's accessible in the program via the __FILE__ macro.

Posting Permissions

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