Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 26 Feb 2013
Offline Last Active Jul 14 2015 07:18 AM

Topics I've Started

ID2D1DeviceContext::DrawImage vs ID2D1DeviceContext::DrawBitmap

20 February 2015 - 07:16 PM

I'm just curious what the difference between ID2D1DeviceContext::DrawImage and ID2D1DeviceContext::DrawBitmap is and whether there is a reason to use one over the other. I realize Drawimage can use an effect, and DrawBitmap cannot, but other than that what are the uses of each as if DrawBitmap wasn't better in some respect I would doubt it would still exist in the library or that Drawimage wouldn't just take over drawbitmap.


Thanks in Advance,


[SharpDX] Creating a Direct2D render Target from a swapchain

14 February 2015 - 11:24 PM

     I've been trying to create a direct2d render target from a swapchain. I have tried to mimic the solution from this thread: http://www.gamedev.net/topic/639578-d2d-d3d11-help-me-to-make-them-work-together/, but it does not work. I get an invalid argument error, and I've eliminated all the other possibilities except the surface I've given it. I am currently using Surface1.FromSwapChain to get my surface for my render target but that does not work. I've tried many ways of getting the surface but nothing seems to work. If anyone can point me in a direction it would be very useful.


Thanks very much,


WPF, Directx 11 Effect passes

08 December 2014 - 04:26 PM

     I have converted the sample from Directx10 SlimDX to work with Directx11. The initial testing was promising witht the fact that I can assign the base color, but when I try to run an effect the program doesn't actually draw the vertices.


The render code is as follows

public void Render(int arg)
            D3DDevice.ImmediateContext.OutputMerger.SetTargets(SampleDepthView, SampleRenderView);
            D3DDevice.ImmediateContext.Rasterizer.SetViewports(new Viewport(0, 0, WindowWidth, WindowHeight, 0.0f, 1.0f));

            D3DDevice.ImmediateContext.ClearDepthStencilView(SampleDepthView, DepthStencilClearFlags.Depth | DepthStencilClearFlags.Stencil, 1.0f, 0);
            float c = ((float)(arg % 1000)) / 999.0f;
            D3DDevice.ImmediateContext.ClearRenderTargetView(SampleRenderView, new SlimDX.Color4(1.0f, c, c, c));

            D3DDevice.ImmediateContext.InputAssembler.InputLayout = SampleLayout;
            D3DDevice.ImmediateContext.InputAssembler.PrimitiveTopology = PrimitiveTopology.TriangleList;
            D3DDevice.ImmediateContext.InputAssembler.SetVertexBuffers(0, new VertexBufferBinding(SampleVertices, 32, 0));

            EffectTechnique technique = SampleEffect.GetTechniqueByIndex(0);
            EffectPass pass = technique.GetPassByIndex(0);

            for (int i = 0; i < technique.Description.PassCount; ++i)
                D3DDevice.ImmediateContext.Draw(3, 0);


If anyone can help me find out what is wrong. I know that the shader I'm using works as I have used it in place of the minitri11 sample's shader and it worked fine.



Thanks in advance,


Fullscreen Alt-Tab out Problem

19 April 2013 - 05:16 PM

So I've used Slimdx Directx 11 and am getting used to it, but a problem aroused from going fullscreen. When I tab out to look at my code it goes back to a windowed mode which is clear(Which as far as I've heard is normal), but then I have no way to regain control of the form. Does anyone know how to deal with this?

Multiple Monitor Fullscreen windows

03 March 2013 - 04:41 PM

In Slimdx, I'm trying to find out how to make a window go fullscreen to a specific monitor with no luck so far. Any help would be appreciated.


Thanks in advance =)