GlTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR) GlTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE) GlTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE) GlBindTexture(GL_TEXTURE_2D, texture_input) Unsigned char *data = stbi_load(fname, &width, &height, &nbChannels, 0) Here is how I load the image: void setTexture(GLuint texture_input, const char *fname) But the imageLoad function always returns 0. I am trying to access pixel value from my compute shader. I know that there is another question with exactly the same title here however the solution provided over there does not work for my case.
0 Comments
Leave a Reply. |