Here is a code sample of what I mean: https://github.com/nucleartide/grapes/blob/master/main.cpp
This is the result of using glDrawArrays:
And this is the result of using glDrawElements:
In the code, window.DrawElements just calls glDrawElements with some default values. Most OpenGL objects are abstracted away into C++ classes; I don’t think there are any problems in my classes, since glDrawArrays works perfectly.
What the heck is going on? For what it’s worth, here’s my glxinfo:
$ optirun glxinfo | grep OpenGL
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce GT 750M/PCIe/SSE2
OpenGL core profile version string: 4.3.0 NVIDIA 331.38
OpenGL core profile shading language version string: 4.30 NVIDIA via Cg compiler
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.4.0 NVIDIA 331.38
OpenGL shading language version string: 4.40 NVIDIA via Cg compiler
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL extensions:
Thanks in advance.