Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: GLSL float/vec3/vec4 array max size = GL_MAX_VERTEX_UNIFORM_VECTORS?

  1. #1
    Newbie Newbie
    Join Date
    Dec 2013
    Posts
    2

    GLSL float/vec3/vec4 array max size = GL_MAX_VERTEX_UNIFORM_VECTORS?

    I run
    Code :
    glGetIntegerv(GL_MAX_VERTEX_UNIFORM_VECTORS, &maxVertUniformsVect);
    and get 1024.

    Than in GLSL I do
    Code :
    uniform mediump vec4[1020] instance_mat
    and that was ok. But with vec3/vec2/float it fails:
    Code :
    uniform mediump float[1030] instance_mat;          // fails
    //uniform mediump vec2[1030] instance_mat;         // and this
    //uniform mediump vec3[1030] instance_mat;         // and this
    With following error:
    cannot locate suitable resource to bind variable "instance_mat". Possibly large array.
    The question is: Does GL_MAX_VERTEX_UNIFORM_VECTORS return the number of all kind of arrays, no matter what size they are?
    I mean, no matter does this float/vec2/vec3/vec4 - all counts as one VERTEX_UNIFORM_VECTOR?

  2. #2
    Member Regular Contributor Nowhere-01's Avatar
    Join Date
    Feb 2011
    Location
    Novosibirsk
    Posts
    251
    it depends on implementation. do you test with AMD hardware by any chance?
    http://www.opengl.org/wiki/Uniform_%28GLSL%29 , here "Implementation limits" mentions it.

  3. #3
    Newbie Newbie
    Join Date
    Dec 2013
    Posts
    2
    No, its nv9600m.

Posting Permissions

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