Advertisement

Display a texture from memory in Sharp/Slim DX

Started by December 31, 2015 04:57 PM
-1 comments, last by myvraccount 9 years, 2 months ago

I'm using SharpDX (very similar to SlimDX, and probably the same code will work).

I'm trying to display a texture that's in memory as either a byte array or a Bitmap object, rather than loading it from a file. Ultimately I guess it needs to be made into a Texture2D object so I can input it into the shaders.

I tried using some function called Resource.FromMemory, but I got unknown exceptions/errors.

I thought maybe the load information or description or something was set up wrong, so I loaded a texture from a file and compared the data, then adjusted my input to the FromMemory function to match, but that didn't fix it.

I'm really stumped, but I really need this to work! Please if you have any ideas, post them. Thank you.

(And no I don't have source code with me, sorry).

This topic is closed to new replies.

Advertisement