problem about sharpdx-Collection of common programming errors


  • Panda Pajama
    video direct3d ms-media-foundation sharpdx
    I am trying to get a MediaFoundation SourceReader to read an H.264 video file, and render the frames to some Direct3D textures so I can them render them as I wish with Direct3D.I’m using SharpDX, but the principles are of course the same as native code.As I understand it, the general data flow should be like this:A SourceReader reads and decodes the video using SourceReader.ReadSample() A VideoProcessor (from IDirect3DDeviceManager9) transfers the frame to a Direct3D9 surface using VideoProcesso

  • Shervanator
    directx hlsl debugging sharpdx
    i’m currently in the process of creating a Windows 8 applicaiton using SharpDX (the managed c# directx wrapper). However I have ran into problems with one of my shaders and I want to know if its possible to debug such applications. PIX doesn’t seem to work of directX apps as the executable does not like opening directly, and the new visual studio graphics debugging toolkit in VS2012 always states “unable to start the experiment” when I try to capture any information about my session.Thanks!

  • Can Poyrazoglu
    windows-phone-8 texture2d sharpdx dds-format
    I’m creating a Windows Phone 8 app and I’m using SharpDX to load a texture.I’ve tried to load PNG using Content.Load<Texture2D>(“filename.png”) but I’ve got errors and I’ve realized that SharpDX in Windows Phone 8 only accepts DDS textures and doesn’t accept PNG/JPEG/BMP etc. I’ve converted my PNG to DDS using texconv filename.png and added the file to my solution just like other files that I’m using in my project (that I can load correctly). When I run my app, I’m getting an exception:{Sh

  • Emiswelt
    c# windows-phone-8 thread-safety texture2d sharpdx
    I am currently writing a small app which shows the preview from the phone camera using a SharpDX sprite batch. For those who have an nokia developer account, the code is mainly from this article.ProblemOccasionally, it seems like previous frames are drawn to the screeb (the “video” jumps back and forth), for the fracture of a second, which looks like oscillation/flicker. I thought of a threading problem (since the PreviewFrameAvailable event handler is called by a different thread than the metho

  • AliveDevil
    c# directx terrain sharpdx
    I read GPU Gems 3 from NVidia about procedural terrain. It’s quite interesting but not applicable for me because I only read the online version without the shipped DVD so I’m not able to download the source for these samples (I got a shrinked version only). The shaders are split into Vertex, Geometry and Pixel Shader which I can’t use because I’m using the SharpDX Toolkit and I don’t have the possibility to use these shaders.Now I thought of using the methods of NVidia to implement my own terrai

  • Wouter
    xna-4.0 sharpdx
    My fear is that XNA has reached the end of the road. To keep up with the latest technology a shift to another game framework might be needed. We have many games in a large codebase, all based on XNA. My question is, how much work would it be to migrate to SharpDX and are there other possibilities?Our code base mainly uses basic 3D rendering and the SpriteBatch, no fancy shader stuff.Update:I should have mentioned we only use 2.5D, we have a simple engine that builds textured quads to render text

  • clamp
    opengl directx monogame sharpdx
    if i use monogame 3.0 beta on windows desktop, does it use the directx renderer (sharpdx) or the opengl renderer by default?if it uses directx is there away to make sharpdx call directly? thanks!

  • c4sh
    textures directx directx11 depth-buffer sharpdx
    I’m programming a two-pass effect in DirectX 11 (SharpDX). It’s supposed to write the depth to a texture in the first pass and then use that texture to extract data on the second one in the pixel shader.What I get is a white screen, with nothing but the interface and I don’t know why nothing is being printed. What could be the problem? I would say I should get at least something from the Depth Texture.This is how I’m setting the depth texture values:this.depthBuffer = new Texture2D(device, new T

  • Anko
    sharpdx instancing
    Could anybody provide working code using SharpDX with D3D11, which does instancing and uses SharpDX’s content pipeline?I have several problems there. I came to understand that one should use a SharpDX.Direct3D11.InputLayout to describe the vertex shader’s input. There I already have a problem. I use SharpDX’s content pipeline, so the shaders are compiled in compile time and not in runtime. Where do I get the shader’s byte code then? It shouldn’t be that hard, but it seems it’s inaccessable from

  • Naveen
    c# directx sharpdx
    I have developed a windows application to read gamepad using SharpDx (XInput) and C# (VS 2008). The application is running smoothly in my development environment. But when i move to some other machine (Windows 7), its giving me error “Unable to load dll ‘xinput1_3.dll’ “. My question is is it mandatory to have directx runtime environment in clint machine also to run the exe ? Because i was thinking it will make use of dll “XInput9_1_0.dll” which is a part of windows 7.

  • clamp
    c# directx-11 directx-9 sharpdx
    I am trying to launch my directX/SharpDX app with DeviceCreationFlags.Debug but i am getting the following crash upon startup:SharpDX.SharpDXException: HRESULT: [0x80004005], Module: [General], ApiCode: [E_FAIL/Unspecified error], Message: Unspecified errorat SharpDX.Result.CheckError() at SharpDX.Direct3D11.Device.CreateDevice(Adapter adapter, DriverType driverType, DeviceCreationFlags flags, FeatureLevel[] featureLevels) at SharpDX.Direct3D11.Device..ctor(Adapter adapter, DeviceCreationFlags f

  • Jim
    c# windows-8 sharpdx
    I downloaded latest SharpDX v2.2 and built the samples in the SharpDXSamples.slnWhen I attempt to run an example that uses XAudio2, the sample crashes with the following errorHere’s the stack trace:at SharpDX.Result.CheckError()at SharpDX.Utilities.CreateComInstance(Guid clsid, CLSCTX clsctx, Guid riid, ComObject comObject)at SharpDX.XAudio2.XAudio2..ctor(XAudio2Flags flags, ProcessorSpecifier processorSpecifier)at SharpDX.XAudio2.XAudio2..ctor()at PlayDynamicSound.Program.Main(String[] args) in

  • clamp
    c# directx-11 directx-9 sharpdx
    I am looping a h264 video in a SharpDX app and occasionally I am getting a crash which I am unable to find the cause.SharpDX.SharpDXException: HRESULT: [0xC00D36BA], Module: [Unknown], ApiCode: [Unknown/Unknown], Message: Unknown at SharpDX.Result.CheckError() at SharpDX.MediaFoundation.MediaFactory.GetService(ComObject unkObjectRef, Guid guidService, Guid riid, IntPtr& vObjectOut)it is called in this function:public static Surface GetSurfaceFromMediaBuffer(MediaBuffer videoBuffer){IntPtr su

  • Rey
    visual-studio-2010 debugging sharpdx
    I’m trying to use the sharpDX debug function but as soon as I run my application with the “DeviceCreationFlags.Debug” Visual Studio crashes and I get this:If I change the Flags to None everything works fine. any Idea? It says “The application tried to call a SDK function that isn’t existing or not available

  • clamp
    c# visual-studio directx pinvoke sharpdx
    My C# application crashes with this window. It’s a DirectX application that uses SharpDX.I don’t even know where to start to debug this? Any tips?when i enable debugging of native code, the crash looks like this:and the stack is:ntdll.dll!77d1f8b1() [Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll] ntdll.dll!77d1f8b1() KernelBase.dll!7658149d() kernel32.dll!75c51194() kernel32.dll!75c51194() ntdll.dll!77d5b459() ntdll.dll!77d5b42b() ntd

  • Jonheel
    c# textures monogame spritebatch sharpdx
    The problem I have discovered is most likely between classes, so I dont really have much option but to post the whole code here: https://www.dropbox.com/sh/smyw9t1ap3by2vd/pBX-aJJ-QxI have been having some trouble with spritebatches rendering textures recently using monogame for windows 8 with xaml where it throws an error after a few seconds of running. The error only occurs after a few seconds, though the less efficient or more textures i render, the quicker it crashes. After doing a git submo

  • clamp
    directx sound audio sharpdx xaudio2
    i am starting to play a sound with XAudio2 and SourceVoice and once its finished, it should be correctly disposed to not have any leaks.i was expecting it to be something like this:sourceVoice.Start();sourceVoice.StreamEnd += delegate{if (!sourceVoice.IsDisposed){sourceVoice.DestroyVoice();sourceVoice.Dispose();}};but that crashes with a read access violation in native code deep in XAudio2.dll which i cant debug.

  • Denis Germ
    c# sharpdx
    I have a very annoying problem at the following lines of code:try{mSwapChain.Present(0, PresentFlags.None); //AccessViolationException, caught by debugger }catch(Exception Ex){throw Ex; //Debugstop here, but not reached }//DeviceContext: SharpDX.Direct3D11.DeviceContext //mVertexBinding: SharpDX.Direct3D11.VertexBufferBindingDeviceContext.InputAssembler.SetVertexBuffers(0, mVertexBinding); DeviceContext.Draw(mNumVertices, 0);My program runs a timer which raises an event, if it is raised and

  • JimmyBoh
    xna monogame sharpdx windows-8
    I have an game which builds for WindowsGL and Windows8. The WindowsGL works fine, but the Windows8 build throws an error when trying to instantiate a new Texture2D.The Code:var texture = new Texture2D(CurrentGame.SpriteBatch.GraphicsDevice, width, 1); // Error thrown here… texture.setData(FunctionThatReturnsColors());You can find the rest of the code on Github.The Error:SharpDX.SharpDXException was unhandled by user codeHResult=-2147024809Message=HRESULT: [0x80070057], Module: [Unknown], ApiCo

  • shoelzer
    directx sharpdx
    I’m using SharpDX and trying to create a D3D11.Texture2D that points to the same data as an existing D3D10.Texture2D. I think that I need to get a DXGI.Surface and use that to create the new texture, but I always get this unhelpful error:HRESULT: [0x80070057], Module: [Unknown], ApiCode: [Unknown/Unknown], Message: The parameter is incorrect.Here’s my current code that compiles but doesn’t work:private D3D11.Texture2D CreateD3D11Texture2D(D3D10.Texture2D d3d10Texture2D) {var texDesc = new D3D11.

  • Han
    image-processing microsoft-metro sharpdx
    I’m working on SharpDX to do image processing on Metro. Now I successfully get the data in WICBitmap, and copy it to WriteableBitmap to show the image in Image Control. But now the problem is, I need to put the data from a WriteableBitmap(not from a file, the image data is instantaneously generated) into a D2D Bitmap, so I write the code:DataStream originalDataStream = new DataStream(Height * Width * 4, true, true); originalWriteableBitmap.PixelBuffer.AsStream().CopyTo(originalDataStream); WICSt

Web site is in building