Fix a bug of using material.

Hi, I'm using this extension to develop a game now.

It has no effect even color is set to material when I use TextureMaterial to draw a line. I read the code found that the color of material isn't set to the final color, so I did some changes and finally it works.