I assume you mean something like this:
AFAIK, you can only do this with a mod called Optifine:
- Close Minecraft and the Launcher.
- Go to the download page and download Optifine HD Ultra for the MC version you are using.
- Open the
.jarfile you just downloaded (using java!) and click install.
When it is finished, close that and open Minecraft. There should be a profile called “Optifine”. Select it and click play. All of your glass blocks will be changed to look like in the first screenshot.