FloydPepper
FloydPepper

Reputation: 13

OpenGL equivalent of D3DCAPS9

I need to know what is the maximum vertex index that the user's hardware can handle by using OpenGL.

With Direct3D I use the D3DCAPS9 struct to do this.

Is there an equivalent of D3DCAPS9 on OpenGL to get this information? Or is there an other method to get the maximum size of a mesh using OpenGL?

Upvotes: 1

Views: 44

Answers (1)

BDL
BDL

Reputation: 22167

There is no restriction to the size of mesh besides the GPU memory size. Due to this, there is no way to query such a limit.

Note, that the datatype used for the element array buffer (index buffer) might add some constraints. When, for example, using GL_UNSIGNED_SHORT, you can draw a maximum of 2^16 different vertices. GL_UNSIGNED_INT allows 2^32 different values which should be enough for most meshes.

Upvotes: 1

Related Questions