Results 1 to 2 of 2

Thread: Quick question about GL_MAX_VERTEX_UNIFORM_VECTORS.

  1. #1

    Quick question about GL_MAX_VERTEX_UNIFORM_VECTORS.

    In OpenGL I can access the number of supported vertex shader uniforms by requesting "GL_MAX_VERTEX_UNIFORM_COMPONENTS" which will let me know how many "float" values can be assigned. This works with any any combination of float, vec2, vec3, etc.

    However in OpenGL ES I can only access the number of supported vertex shader uniform vectors by requesting "GL_MAX_VERTEX_UNIFORM_VECTORS" which will let me know how many "vec4" values can be assigned.

    My question is simple. If I set a uniform using "glUniform1f" or "glUniform2f", etc, does it expand to fill an entire "vec4" worth of space on the GPU, or are those values packed in memory to only fill the required space? Or heaven forbid is it vendor specific?

    I just need to figure out if I need to "prepack" my uniforms before sending them to the GPU. Thanks!

  2. #2
    Senior Member
    Join Date
    May 2006
    Posts
    353

    Re: Quick question about GL_MAX_VERTEX_UNIFORM_VECTORS.

    Whether they are actually packed is implementation specific (but also completely invisible to the application). However there is a packing rule (described in appendix A.7 of the GLSL ES spec) which describes how uniform variables should be counted against the implementation limit.
    Georg Kolling, Imagination Technologies
    Please ask questions specific to PowerVR hardware or SDKs on the PowerVR Insider Forum
    DevTech@imgtec.com | http://www.powervrinsider.com

Similar Threads

  1. A few quick questions from a newbie
    By omgi in forum OpenCL
    Replies: 3
    Last Post: 07-06-2011, 03:43 PM
  2. Spelling issue in quick reference card
    By clamport in forum OpenCL
    Replies: 0
    Last Post: 10-28-2009, 05:50 AM
  3. OpenCL Quick Reference card out-of-date
    By seangies in forum OpenCL
    Replies: 0
    Last Post: 06-12-2009, 11:41 AM

Posting Permissions

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