read and write integer 1-channel texture opengl
问题 I want to: create a read and writable 1-channel texture that contains integers. using a shader, write integer "I" to the texture. use the texture as a source, sample it and compare if the sample is equal to the integer I. All this with core profile 3.3. This is what I've got so far: I create the texture like so: glTexImage2D(GL_TEXTURE_2D, 0, GL_R8, width, height, 0, GL_RED, GL_INT, (java.nio.ByteBuffer) null); I've Also tried GL_R8I and GL_RED_INTEGER, but that won't work. I bind this