I found that BorderImage has a member function SetMaterial
void SetMaterial (Material *material)
//Set material for custom rendering.
I got an incorrect display (probably a small part of the texture) when i had set a material for it.
the material is a video frame (yuv420p piexl format) refferd to Theora video playback (Theora video playback)
the follow is my code:
1 create a BorderImage
UIElement* root = GetSubsystem<UI>()->GetRoot(); BorderImage* pImgFrame=root->CreateChild<BorderImage>(); pImgFrame->SetPosition(0,0); pImgFrame->SetSize(640,360);
2 set a material
It is ok to assign the outputMaterial to a cube or a plane.