简体   繁体   中英

glVertexAttribPointer stride GL_INVALID_VALUE opengl 3.3

I'm experiencing issues similar to described in this question , which was never answered. Basicly when I'm calling

glVertexAttribPointer

with stride greater than this exact value: 640 . OpenGL GL_INVALID_VALUE error is raised. According to documentation such an arror can be raised in one case:

GL_INVALID_VALUE is generated if stride is negative.

Which is obviously not my case.

In OpenGL 4.4 the maximum value is specified and set to GL_MAX_VERTEX_ATTRIB_STRIDE according to this site

Is there a certain magic number in older versions of OpenGL (3.3 in my case) for a maximum vertex stride? Is there any other reason that this function can raise GL_INVALID_VALUE ?

Is there a certain magic number in older versions of OpenGL (3.3 in my case) for a maximum vertex stride?

In older versions ? No. Implementations were not given leave to deny you the use of any stride. So long as it was positive or zero, the implementation had to permit it.

Is there any other reason that this function can raise GL_INVALID_VALUE?

Yes: the hardware can't handle it . If you're only getting GL 3.3, then your hardware is quite old. So it's probably going to have a lower limit than the 4.4 requirement of 2048.

Now obviously, the implementation isn't supposed to give out errors unless the spec says that it can. But adherence to the spec has never been NVIDIA's primary goal with their implementation...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM