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

Fastest way to programatically load a texture from a generated PNG file?

$
0
0

@Luna_Tuna wrote:

I've tried the FileStream trick but the call that takes all day (8 - 15 seconds) is Texture2D.FromStream()

I've tried others' loaders but they are all variations of this base method so they are even slower.

The application I'm writing is mathematical and I'm generating PNG images from LaTeX input on the fly using McTeK installed "latex.exe" and "dvipng.exe" on the Path.

Generating the PNG takes aboout 2 seconds! Who'd have thought the bottleneck would be loading the PNG IMAGE!!!

My first thought is to use the Pipelining tool and cache about 5,000 LaTeX -rendered PNGs of common expressions. If the object in the scene has to wait to render, then it will display the text "rendering $\mathbb{Z}$" or something...

But that is so shitty! Please provide me with the hack that speeds up loading PNGs for textures.

Thanks.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 6821

Trending Articles