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 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: shader source names

  1. #1
    Junior Member Regular Contributor
    Join Date
    Nov 2012
    Location
    Bremen, Germany
    Posts
    167

    shader source names

    glsl should provide for means to Name source buffers either inside a given source or provide another mechanism to Name source-buffers, so that source-names can be shown in shader-info-logs instead of the source-index.

  2. #2

  3. #3
    Advanced Member Frequent Contributor
    Join Date
    Apr 2009
    Posts
    595
    and the GL analogue: http://www.opengl.org/registry/specs/KHR/debug.txt which is a part of the GL4.3 core specification (Chapter 20), the labels for objects are in section 7 of Chapter 20.

    It would be ideal for you hlewin to read the spec.
    Last edited by kRogue; 02-01-2013 at 12:16 PM.

  4. #4
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,948
    Technically, that's not what he asked for. He's talking about compiling multiple strings within a shader, such that each individual string has its own name. Like giving GLSL a #name directive that tells the compiler to use that name when it would have used a string index.

  5. #5
    Junior Member Regular Contributor
    Join Date
    Nov 2012
    Location
    Bremen, Germany
    Posts
    167
    Right - and when source-buffers can be named that way, maybe there is a way to keep them in memory by user request.
    That would be a way to realize #include-statements despite of the fact that there is no filesystem interaction.

  6. #6

  7. #7
    Junior Member Regular Contributor
    Join Date
    Nov 2012
    Location
    Bremen, Germany
    Posts
    167
    I must say I was not aware of that extension.
    What seems missing though is the possibility to enumerate the named strings, so that an application does not have to keep it's own list of sources that were loaded.

  8. #8
    Junior Member Regular Contributor
    Join Date
    Nov 2012
    Location
    Bremen, Germany
    Posts
    167
    On a second thought the extension should also introduce SHADER_SOURCE as type to make a distinction easier if the named string is actually to be compiled. That would make list-keeping of compilation-input-files on the application-side grossly unnecessary.

  9. #9
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,948
    What seems missing though is the possibility to enumerate the named strings, so that an application does not have to keep it's own list of sources that were loaded.
    Why would you need to? If you're using inclusion, then you probably have a specific list of strings that you want to be available for inclusion. You probably have these sitting on disk somewhere, with specific names and directory structures, which you simply recursively read and load directly. Why would you need to enumerate these after loading them? You know what they are; you wrote them and named them.

  10. #10
    Junior Member Regular Contributor
    Join Date
    Nov 2012
    Location
    Bremen, Germany
    Posts
    167
    Though one of course knows what was loaded, the information gets copied into the gl no matter what. Why should that information not be made accessible? If writing a module concerned with shader stuff one might not necessarily know what sources were loaded. That information would eiher have to be passed to the module by the user or can be queried. That apart from the need to delete the named strings once everything got compiled. For doing so one would either have to keep a seperate list or recurse through everything twice - both of which is unnecessaryif infos are made accessible.

Posting Permissions

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