Maximum number of buffers

How many buffers can I create using glGenBuffers ? Can I try to generate 8192 (or more) buffers?

I process only one buffer, but I need to store many buffers.

 int i = 0; glGetIntegerv(GL_MAX_DRAW_BUFFERS, &i); 

returns 8 . This is the maximum amount of buffer that is executed at the same time.

I'm right?

+4
source share
2 answers

The GL_MAX_DRAW_BUFFERS value has nothing to do with glGenBuffers , but with buffers into which a fragment shader can be written (see glDrawBuffers ).

There are no limits on the number of buffers in the standard; you can create as many as you want. However, you are limited by memory, so if you plan to store huge amounts of data, a call to glBufferData may fail using GL_OUT_OF_MEMORY

+5
source

How many buffers can I generate with the glGenBuffers function?

glGenBuffers does not allocate any storage, it only has a name / identifier for the buffer. The limit for this is purely implementation-specific, but theoretically it is available only for available memory and the size of the control structure. A more limiting factor is the amount of buffer storage that you allocate.

Of course, the question is: why do you need so many buffers? And why are you Pixes Buffer objects, or applications for color buffers in general? Were textures no better suited to store your data?

returns 8. This is the maximum amount of buffer that is executed at the same time.

Yes, this is the maximum number of target buffers in multiple target renderings.

+2
source

Source: https://habr.com/ru/post/1411462/


All Articles