It seems that it is not possible to create multiple OpenGL textures for the same window. When sources are duplicated in studio mode this causes window capture sources to become black. The OBS_SOURCE_DO_NOT_DUPLICATE flag prevents that this happens.