gl-430-program-compute-image
elect86 opened this issue ยท 1 comments
Ok, let me get this thing right ๐
In your initBuffer
I saw you were initializing all the buffers passing a size twice as needed..
positionSize * 2
I tried first to set it back to 1 and then I got an exception at the first glTexBufferRange
, because
"error(high) 1281: GL_INVALID_VALUE. + is greater than the value of BUFFER_SIZE for ."
This means that in our initBuffer
we should do the same trick that we do for the transform buffur, that is getting the GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT
and creating our input and output buffers with the max(textureBufferOffset, bufferSize)
, where bufferSize
is essentially in sequence:
positionSize
texCoordSize
colorData
Am I right?
You are right, this was a bug in the sample. I changed the size to positionSize and it works just fine with me on AMD , Intel and NVIDIA drivers.
Thanks for reporting,
Christophe