I am drawing an image on a quad object using the Graphics.DrawTexture method.
Transform theQuad = GameObject.Find("Quad").GetComponent<Transform>();
Material mat = planeObj.GetComponent<MeshRenderer>().sharedMaterial;
GL.PushMatrix();
GL.LoadProjectionMatrix(Camera.main.projectionMatrix);
GL.modelview = Camera.main.worldToCameraMatrix * theQuad.localToWorldMatrix;
Graphics.DrawTexture(new Rect(-0.5f, -0.5f, 1, 1), mat.GetTexture("_DataTex"), mat);
GL.PopMatrix();
But an extra image also shows up alongside the intended one.
The one on the left is the correct one, at the correct position and the right one is the extra one that that needs to be removed.
How do I fix this ?