Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Search:

Type: Posts; User: John Kessenich

Search: Search took 0.03 seconds.

  1. Replies
    12
    Views
    771

    Re: forward declaring functions

    OpenGL 2.0 says that forward declaring a function, like you did in your example, works. You can give the prototype, then call it, then provide the body. This feature is intentionally provided, and...
  2. Re: Would you use shader debugging if it was available?

    Yes, the specification says this is not allowed. We will fix it.

    Were you using an out of date or non-standard C++ compiler? On Windows, we went to the .NET version of the compiler a long time...
  3. Re: Would you use shader debugging if it was available?

    Generally, what you say is not true. Could you email me an example? For example, the code

    if (false)
    3 + 2.4;
    gets a semantic error for mixing ints and floats.

    It is true...
  4. Replies
    9
    Views
    311

    Re: Array of constants

    Does declaring the array as a uniform, and setting it from the application work? Should be high performing. The language supports indirect indexing into uniform arrays.
  5. Replies
    19
    Views
    403

    Re: efficiency of separate shaders

    Good, I was just exploring "heavy-weight" linking issues, which was the perceived problem I was responding to.

    Yes, there is a required link step, which serves several purposes, but it need not be...
  6. Replies
    19
    Views
    403

    Re: efficiency of separate shaders

    I'm not yet believing a statement along the lines that OpenGL 2.0 specification requires a significantly heavier-weight link step than the alternatives do.

    Some things to note:

    * If you have...
  7. Replies
    38
    Views
    12,933

    Re: Complains regarding GLSL limitations

    Collecting several responses here...

    * I am interested in community feedback for the next version of the language. Version 1.1 reflects some of this over version 1.0. Not all features were...
  8. Re: GLSL vs. CG: linking shaders on the fly?

    Some compiling may deferred until linking, and this is likely, as global optimizations can be done then. OGL2 only requires parsing and returning language-level errors at compile time.

    However,...
  9. Replies
    26
    Views
    2,299

    Re: Please improve the glSlang spec !

    FYI, The following matrices have been added to an interim version of the shading language spec. Hopefully, you'll see them in reality sometime soon.

    uniform mat4 gl_ModelViewMatrixInverse;...
  10. Replies
    34
    Views
    1,257

    Re: Portability

    Yes, there is general agreement that a vendor won't change default behavior.

    GLSL can be expanded. A vendor is allowed to extend the language to support their hardware.

    I hope this is can be...
  11. Replies
    34
    Views
    1,257

    Re: Portability

    What about this C++ code?

    void foo(int a, int b) {}
    void foo(int a, float b) {}

    void bar()
    {
    foo(1, 2);
    foo(1.0, 2);
    foo(1, 2.0);
  12. Replies
    34
    Views
    1,257

    Re: Portability

    The danger and ambiguity in doing autopromotion is most clear when doing signature matching to overloaded functions. A general autopromotion capability in the language must address these...
  13. Replies
    34
    Views
    1,257

    Portability

    Hi,

    As an author of the OpenGL Shading Language Specification, I'm concerned about its portability.

    One thing the specification says regarding the motivation of a high-level language is Now, a...
  14. Replies
    39
    Views
    14,486

    Re: Tom's GLSL new demo

    Usually with languages, the compiler that catches the most errors is the better one.

    A hardware vendor is allowed to extend the standard library. We should have no problems here.

    Casts are...
  15. Re: inverse and transpose of matrices in glSlang state

    Note that if a matrix really is stored in column major order (encouraged by the way OGL specs are written), then a matrix row really is 4 scattered floats. So, there is some connection between the...
  16. Replies
    13
    Views
    1,457

    Re: noise function, can't compile it!

    A couple of notes:

    1. This is dangerous, as it goes against the spec., encouraging the authoring of shaders that are not portable.

    2. "2" is, in fact, absolutely, an integer, not a float. To...
  17. Re: non-constant array indices for uniforms...

    This should not be accepted by the compiler. The specification requires array sizes to be known at compile time.

    As justification, note that uniforms can be changed at each primitive, meaning...
  18. Replies
    10
    Views
    1,068

    Re: if/then/else and for statements

    In practice, it will be a combination of the hardware, the compiler, and even the particular case whether or not both paths of a selection are evaluated. Compilers will try to be smart based on what...
Results 1 to 18 of 18