Jump to content

  • Log In with Google      Sign In   
  • Create Account


We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.

Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Member Since 19 Jul 2012
Offline Last Active Nov 17 2012 12:17 PM

Posts I've Made

In Topic: Use of Bitmap with DirectX11

21 October 2012 - 07:48 AM

---------- UPDATE ---------------------------
The method for building the Texture2D from Stream works. The rest of the problem (converting the Texture2D to a stream) I will also ask in another forum and I will report if I find a way (eventually even without help of another forum) to manage this.

This method seems to work, but the conversion back to a Stream/File (in the code bellow a file), does not work.Has anyone an idea why? I use SharpDX.
[source lang="csharp"]Bitmap input = (Bitmap)Image.FromFile("Desert.jpg"); BitmapData inputBmpData = input.LockBits(new System.Drawing.Rectangle(0,0,input.Width, input.Height), ImageLockMode.ReadOnly, PixelFormat.Format32bppPArgb); DataRectangle inputDataRectangle = new DataRectangle(inputBmpData.Scan0, inputBmpData.Stride);inputTex2D = new Texture2D(device, new Texture2DDescription() { BindFlags = BindFlags.ShaderResource, CpuAccessFlags = CpuAccessFlags.None, Format = Format.B8G8R8A8_UNorm, OptionFlags = ResourceOptionFlags.None, MipLevels = 1, Usage = ResourceUsage.Immutable, Width = inputBmpData.Width, Height = inputBmpData.Height, ArraySize = 1, SampleDescription = new SampleDescription(1, 0) }, inputDataRectangle);Texture2D.ToFile(context, inputTex2D, ImageFileFormat.Jpg, "Hello.jpg");[/source]

In Topic: Use of Bitmap with DirectX11

20 October 2012 - 03:06 PM

Thanks for this answers. I was not sure if I should use C# (with a wrapper) or C++, but I think I will start with C#, perhaps I will, if it works, try it with C++ for learning purpose.
I will try I out as fast as I can.

In Topic: Use of Bitmap with DirectX11

20 October 2012 - 12:57 PM

I mean the Bitmap Object out of the System.Drawing namespace of the .net framework. I'm sorry that I forgot to write this. But if this would work better with other image objects, supported by the .net framework (4 and higher), this would also be an alternative.

In Topic: Problem with Debugging of C++ Error

16 August 2012 - 12:19 PM

The change from console to Windows application solved the problem.
I changed under Linker, System Subsystem to Windows - and it works.
Thanks for helping. :-)

In Topic: Problem with Debugging of C++ Error

15 August 2012 - 01:20 AM

I have a WinMain function. Should I rename it, or write a main function that calls the WinMain function?
@dimitri.adamou How can I change the application type to Windows Application?