Graphics.DrawTexture problem

I am using Graphics.DrawTexture to draw a texture and material with a shader on what will be a HUD. That works.

The problem is, the material also renders in 3d space, appearing near the origin.

The call is:

Graphics.DrawTexture(new Rect(0,0, m_Size, m_Size), m_textureOne, m_materialOne);

It is being called from a function that is called from OnGUI.

Is this a bug? Am I doing something wrong? Is this the intended use for this function? Is there another way to render a material with shader easily to the HUD/GUI area?

Thanks.

P.S. I do have Unity Pro.

Edit: Omitting the material still rendered the texture in 3d space as well as the HUD.

Are you sure you only render the texture from inside a Repaint event?

That was it exactly, adding the check for Repaint event fixed it.

Thanks!