Quantcast
Channel: Community | MonoGame - Latest topics
Viewing all articles
Browse latest Browse all 6821

SpriteFont Texture2D GetData throws AccessViolationException

$
0
0

@henry_lisowski wrote:

So I'm trying to get the color data from the Texture2D of a SpriteFont.

The SpriteFont is built using Importer: SpriteFontImporter and Processor: SpriteFontDescription, with TextureFormat DxtCompressed (the default). When I go to GetData() on it, I get:

An unhandled exception of type 'System.AccessViolationException' occurred in SharpDX.dll
Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

If I change the TextureFormat to something else (like Color) I can successfully get the data, but the texture looks very incorrect.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 6821

Trending Articles