Some opengl changes with textures. Add Javadoc