Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3751324
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T09:03:30+00:00 2026-05-19T09:03:30+00:00

Running openGL 3.1, the question is simple. From GLSL site, here is how one

  • 0

Running openGL 3.1, the question is simple.

From GLSL site, here is how one can define array of uniform buffer blocks:

uniform BlockName
{
  vec3 blockMember1, blockMember2;
  float blockMember3;
} multiBlocks[3];

Now, is it possible to have dynamic number of these multiBlocks? There are no pointers in GLSL so no “new” statement etc.

If not, is there other approach to send dynamic number of elements?
My block is currently packing four floats and one vec2.

I haven’t wrote shader yet so you can suggest anything, thanks 😉

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T09:03:31+00:00Added an answer on May 19, 2026 at 9:03 am

    Ok so i wrote also to openGL forum and this came out

    So basicaly you have 3 solutions:
    Uniform buffer objects or Texture buffers or static array with some high number of prepared elements and use another uniform for specifying actual size.

    The last one could be upgraded with OneSadCookie’s definition of max size in compile time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to design & implement a simple windowing & widget for OpenGL running
So I've got an OpenGL application running that can toggle between fullscreen mode and
I remember running into this problem when I started using OpenGL in OS X.
I'm currently working on an OpenGL ES 1.1 app for the iPad its running
I have a simulation that uses OpenGL for drawing. While it is running, I
I've moved on from trying to use OpenGL through Penumbra to trying to draw
What differences have you seen when running an OpenGL ES based iPhone game on
One user running Snow Leopard wasn't able to compile my code. After an hour
I just want to do a simple animation (for example in C++ using OpenGL)
I have been running into issues with OpenGL rendering on different computers: Works: Intel

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.