Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 173 of 173 FirstFirst ... 73123163171172173
Results 1,721 to 1,724 of 1724

Thread: OpenGL 3 Updates

  1. #1721
    Advanced Member Frequent Contributor
    Join Date
    Apr 2003

    Re: OpenGL 3 Updates

    Binding VBOs to attributes is one of the most often called functions when rendering a frame. That can add up to several thousand times per frame. These function calls must be as fast as possible. Doing a hash-lookup followed by a string-comparison _will_ be slower than just using an index.

    Just try it for yourself. For example, remove any caching of uniform-locations in your renderer and do a glGetUniformLocation() every time you want to update a uniform.

    All the problems related to aliasing of built-in attributes are essentially gone since the last fixed function hardware went away. The hardware has to be able to accept any kind of attribute data at any attribute slot and can't make any assumptions about the data and format that is bound to certain attributes.

    I never had any problems with fixed attribute locations, maybe because I never made (ab-)use of aliasing attributes. And with the introduction of GL3.0 / GLSL 1.30 the whole aliasing thing has become a non-issue anyway because there are no built in attributes anymore.

    Btw, I find the "Clockworkcoders Tutorials" kind of funny. It shows buggy code and a "misuse of color". What is any beginner supposed to learn from that?

  2. #1722
    Member Regular Contributor
    Join Date
    Oct 2006

    Re: OpenGL 3 Updates

    I'm pretty sure that VAO is supposed to take care of the binding costs? (Disclaimer: haven't read the VAO specs yet)

    In any case, I dislike the notion of using fixed attribute locations, in the same way that I dislike the notion of using OpenGL handles without calling glGen*. Yes, you can do it, but it's something that shouldn't even be allowed in a well-engineered API.
    [The Open Toolkit library: C# OpenGL 4.4, OpenGL ES 3.1, OpenAL 1.1 for Mono/.Net]

  3. #1723
    Senior Member OpenGL Pro Ilian Dinev's Avatar
    Join Date
    Jan 2008
    Watford, UK

    Re: OpenGL 3 Updates

    Quote Originally Posted by Jan
    I really don't bother much about such minor details

    "glBindAttributeByName ('bla', ..)" and have the driver take care for the rest, until i deactivate the array again.
    But i fear i have to implement such an abstraction myself someday.
    If you want, I can write the code for you, to let you use OpenGL like this:
    Then, Khronos can simply bring in-code GLSL semantics, bound to integer-values, like the Cg and HLSL compilers do - and let us all be happy.

  4. #1724
    Senior Member OpenGL Guru
    Join Date
    Dec 2000
    Reutlingen, Germany

    Re: OpenGL 3 Updates

    That is a very nice offer, but i doubt it could be written in an easy plug-and-play style, so i would need to do it myself, anyway. But if you like writing a tutorial, go ahead, there are certainly many people interested to see how to use GL3 (or modern GL in general), myself included (if i have learned one thing over the years, it is that there are always things you have never heard about).

    GLIM - Immediate Mode Emulation for GL3

Posting Permissions

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