Hi,
I am using MRT and wanted to clear each individual draw buffer with a different color (which is very convenient).
I found that "glClearBuffer" can do exactly that but when trying to use this in LWJGL, this method seems to first miss a parameter that is mentioned in the GL 3.2 spec (enum buffer) and second the method crashes when being invoked like so: glClearBuffer(0, <float buffer with 4 floats>) with a color attachment currently being bound to index 0 (via glDrawBuffers command).
The FloatBuffer is already limited to 4 and positioned at 0.
The crash is occurring at:
j org.lwjgl.opengl.GL30.glClearBufferfv(ILjava/nio/FloatBuffer;)V+26
How could this be fixed?
Thanks for the report.
The drawbuffer argument was missing from the OpenGL 3.0 specification, was added later in the 3.1 spec. Fixed and committed, grab a fresh build (https://www.newdawnsoftware.com/hudson/job/LWJGL/) when it's up. Btw, I used this opportunity to also strip the postfixes from the Float/Intbuffer versions.
Wonderful, thanks!
Works as expected.