I am trying to understand what is going on with textures in the many examples I see online and why my image is blanking out. Below is a typical example of the code I find. When I uncomment the first glBindTexture call with the textureId param the image produced by glTexImage3D goes blank. I'm not sure what I'm binding to what and what that has to do with the following glTexImage3D command and why the binding is fouling the image up. Can anyone explain? Why in the many examples do you bind the texture to zero (0) after the glTexImage3D command?
--- 8< ---
// uncomment to black out image
glTexImage3D(GL_TEXTURE_3D, 0,GL_RGBA8 , WIDTH, HEIGHT, DEPTH, 0, GL_RGBA, GL_UNSIGNED_BYTE, data);