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 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: Learning Modern OpenGL

  1. #11
    Member Regular Contributor
    Join Date
    Apr 2006
    Location
    Irvine CA
    Posts
    300

    Re: Learning Modern OpenGL

    Quote Originally Posted by scratt
    Do you mean by that last comment that in 3.1 they are back in, or that they were put back into the 3.0 spec.?
    Well note that 3.0 spec *did not remove* anything, it only marked things as deprecated.

    Wide lines were marked. Now they are not.

  2. #12
    Member Regular Contributor
    Join Date
    Apr 2006
    Location
    Irvine CA
    Posts
    300

    Re: Learning Modern OpenGL

    Quote Originally Posted by Ilian Dinev
    Rob, that is great news! I missed it somehow. I'll try to create some 3.0 tutes once I get fluent.

    Actually with my post I was over-exaggerating on how GL3.0 looks to me. Uniform-buffers are a great salvation, but they're not advertised correctly, imho. Having a buffer per instance is unpalatable. Instead, this should be possible/advertised:
    bindable uniform SOME_STRUCT g_constants[1];
    ...
    vec4 color2 = g_constants[InstanceConstID].color2;
    // above InstanceConstID is a uniform or varying, and can have value = 777

    Meanwhile, glUniform should be able to upload a whole struct, that contains only vec4/mat4, or an array of vec4.

    In a perfect world, maybe there'd be a glCopyUniforms(...,UBO buf,int vec4offset,int vec4count). I've got many ideas/solutions (they're kind of obvious), but I don't know NDA-class details on current gpus to choose the best one to propose. I.e whether there's a cached range of constants in all gpus, or everything depends on general-purpose caches while loading constant-data dynamically.
    Forgive me for asking, but to my knowledge the uniform buffer mechanism for GL 3.1 is not published yet. Which spec are you reading ?

  3. #13
    Senior Member OpenGL Pro Ilian Dinev's Avatar
    Join Date
    Jan 2008
    Location
    Watford, UK
    Posts
    1,262

    Re: Learning Modern OpenGL

    Bindable uniforms is what I meant. And what's exposed by nv_parameter_buffer_object. The latter is very neat stuff, probably precisely what most devs would need (specifying a range to be bound). Still, being down-to-the-metal (having semantics to specify which shader symbol takes which slot) is necessary for such stuff.

Posting Permissions

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