I have a DXT1 texture loaded in a ByteBuffer and I'm trying to load it with Opengl
int tID = glGenTextures();
glBindTexture(GL_TEXTURE_2D, tID);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glCompressedTexImage2D(GL_TEXTURE_2D, 0, GL_COMPRESSED_RGB_S3TC_DXT1_EXT, w, h, 0, imageData);
System.out.println(gluErrorString(glGetError()));
It's giving me the error "Invalid Operation" on the glCompressedTexImage2D call. Can't seem to figure out why.
Thanks