Does anyone know if it is possible in XNA to dynamically load bitmap from jpg files and draw texture2d using other surface formats then SurfaceFormat.Color
?
Because of memory/speed limits I need to use Bgr565
or Dxt surface
formats.
I could use content pipeline and set Content Processor, Texture Format to DxtCompressed but Content.Load
doesn't allow dynamic texture load.
I could use Texture2D.FromStream
but it creates SurfaceFormat.Color
texture only.
I experiment with creating empty Texture2D in desired surface format and try to manualy set bitmap data using SetData
but it seems like a too complicated way.
Is there Texture2D.FromStream
and Texture2D.SetData
the only way to dynamically load jpg files and use them as Bgr565
or Dxt
surface format textures?