MonoGame/MonoGame

[DesktopGL] Texture2D.GetData always reads entire texture

Aberta

#7.287 aberto em 9 de ago. de 2020

 (8 comentários) (0 reação) (0 responsável)C# (3.071 forks)batch import
Help WantedOpenGLbughelp wantedscope: graphicsscope: opengl

Métricas do repositório

Stars
 (13.886 estrelas)
Métricas de merge de PR
 (Mesclagem média 25d 3h) (22 fundiu PRs em 30d)

Description

When using GraphicsDevice.GetBackBufferData in DesktopGL while a RenderTarget2D is applied, the returned texture data is ordered incorrectly. When it is stored in a texture without re-ordering, you can see that the data is stored "upside down".

This issue does not occur when there is no applied render target.

The following two screenshots were taken in a test app. The left side of each screenshot is the original drawing, and the right side is an overlay of a texture generated from getting the drawn data from the back buffer. The first screenshot was taken without a render target applied, the second one was taken with one applied.

dotnet_CT6uXZ4dWs dotnet_EHgfjw7uZq

What version of MonoGame does the bug occur on:

  • MonoGame 3.8.0.1375-develop

What operating system are you using:

  • Windows

What MonoGame platform are you using:

  • DesktopGL

Guia do colaborador