The error message is pretty definitive "... because at most 16 elements can be returned ...". ( That is from memory - shows how often this has screwed me over )

This is a check LWJGL does and it assumes the maximum size required for any value of pname since otherwise you would have to switch through each and every possible parameter to find the correct size. That would not be efficient, bearing in mind this is a function you could be calling many times each frame.

First of all, the buffer is required to have 16 elements for historical reasons. It's been like that since the first LWJGL version and there hasn't been any serious reason/complain to change it. The new LWJGL 3.0 that is currently under development has reduced the requirement to a single element. With that said:

a) There is a alternative GetInteger that returns a simple int and doesn't even require you to pass a buffer. It covers 99% of the use-cases.b) It's very simple to allocate a single buffer and reuse it for all your GetX calls.c) 16 x 4 = 64 bytes = a single cache-line, which is the unit of basically every memory operation on modern CPUs. The fact that GetX can even cause a pipeline flush makes the 16 element "overhead" laughable in comparison.