I'm trying to use mipmapping to get a downsampled version of a texture of type GL_DEPTH_COMPONENT. I enable mipmaps similar to this:
glGenerateMipmap(GL_TEXTURE_2D);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
And use it in the shader like this:
texture2D(reference_view, coord, 5.0).bgr;
With 5.0 being the mipmap level I want to access.
This works fine for rgba textures, however I can't seem to get it work with the depth component texture. Is it even supported in opengl?