user2119107
user2119107

Reputation: 13

How to get the max constant buffer size with OpenGL?

In my application, I want to get the max constant buffer size. With DX, there is a macro D3D10_REQ_CONSTANT_BUFFER_ELEMENT_COUNT represents this value.

How can I get this value with OpenGL?

Upvotes: 1

Views: 4964

Answers (1)

Nicol Bolas
Nicol Bolas

Reputation: 474086

OpenGL has no such limitation.

Buffer Objects can be of arbitrary sizes. However, different uses of buffer objects have different size limitations. The source for vertex array data is essentially unbounded. But buffer textures have a size limit. The size of a bound range of uniform buffer data has a limit. And various other uses have limits, as needed. But there is no limit on the size of the memory buffer itself.

Basically, think of buffer objects as pointers to GPU memory, with glBufferData as malloc. Different APIs that use pointers can have limits on how much memory they can access. But malloc itself doesn't have any particular limits (besides running out of memory, of course).

Upvotes: 6

Related Questions