Hi.
I have some problems with getting screenshot from scene using Graphics.ResolveToTexture (Xamarin,Android,Mali400).
This code work fine in genymotion bad generate bad texture on real hardware
int width = graphics.Width;
int height =graphics.Height;
/////////
Urho.Urho2D.Texture2D renderTexture = new Urho.Urho2D.Texture2D();
renderTexture.SetSize(width, height, Graphics.RGBAFormat, TextureUsage.Rendertarget);
renderTexture.FilterMode = TextureFilterMode.Bilinear;
Graphics.ResolveToTexture(renderTexture, new IntRect(0, 0, width, height));
///adding to sprite to see what getted
sprite = new Sprite();
Root.AddChild(sprite);
sprite.Texture = texture;
sprite.SetSize(256, 256);
sprite.BlendMode = BlendMode.Replace;
sprite.Position = new IntVector2(0, 0);
//saving to png
int size = width * height * 4;
IntPtr ptr = Marshal.AllocHGlobal(size);
bool res = renderTexture.GetData(0, ptr);
byte[] barr = ptr.ToBytesArray(size);
Java.Nio.ByteBuffer byteBuffer = Java.Nio.ByteBuffer.Wrap(barr);
Android.Graphics.Bitmap newBitmap = Android.Graphics.Bitmap.CreateBitmap(width, height, Android.Graphics.Bitmap.Config.Argb8888);
newBitmap.CopyPixelsFromBuffer(byteBuffer);
System.IO.FileStream stream = new System.IO.FileStream(filepath, System.IO.FileMode.Create, System.IO.FileAccess.Write);
rotatedBitmap.Compress(Android.Graphics.Bitmap.CompressFormat.Png, 100, stream);
stream.Close();
///resulting image from real hardware
//genymotion