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: nbdspcl

Search: Search took 0.00 seconds.

  1. Replies
    0
    Views
    321

    Cannot align data passed to shader

    I cannot get the following structure to work when using it in Shader Storage Object:

    Definitions in shader:


    struct Object
    {
    vec4 color;
    mat3 ...
  2. Replies
    1
    Views
    658

    Well, as has been advised elsewhere, the solution...

    Well, as has been advised elsewhere, the solution to this question is that one can pass to a shader already formatted data (array of structs) instead of raw floats.
  3. Replies
    1
    Views
    658

    Accessing array values from a shader

    Suppose I have an array variable in a shader, declared in a shader storage block:


    layout(std430, binding = 2) buffer MyBuffer
    {
    float lotsOfFloats[];
    };

    and a struct:
  4. > but someone recommended me to use legacy OpenGL...

    > but someone recommended me to use legacy OpenGL for such a simple project

    Maybe someone recommended just what he/she just got used to. New OpenGL API is even simpler than the legacy immediate...
  5. > There is no down side to buffer storage I...

    > There is no down side to buffer storage

    I wonder what are the up sides? In the documentation there is nothing definite about the gains that buffer storage give except that it's immutable type of...
  6. Replies
    2
    Views
    758

    mhagain I supposed that since Shader Storage...

    mhagain

    I supposed that since Shader Storage Blocks have both read and write access from shaders, and uniforms are read only, using uniforms maybe somewhat faster. But as it seems, vectors of...
  7. Replies
    2
    Views
    758

    A vector of arbitrary length as a uniform

    What is the efficient way to provide a vector with data of arbitrary length into a shader from which the shader can read values that are not unique for each vertex? This probably can be done with...
  8. Replies
    4
    Views
    1,010

    Thanks for the response... Right. I suppose you...

    Thanks for the response...
    Right. I suppose you need to know what did not work:biggrin-new:
    I draw a bunch of VBOLineLoop & a bunch of other geometry; the other geometry classes have similar...
Results 1 to 8 of 8