SharpDX is an open-source third-party managed DirectX wrapper.
0
votes
1answer
20 views
Adding mesh's\objects to procedural isosurface terrain
Thanks again for reading!
So following on from my last question, I have my fully working isosurface terrain and now its time to add my trees and grass and whatever to the world.
The old way I was ...
1
vote
1answer
34 views
IsoSurface Normals\Texture Coords Problems(DX11\SharpDX)
Hi and thanks for your time!
So over the past few days I have been playing with isosurface construction from volume textures, I have it running on the cpu and all is well from a "just got it working" ...
0
votes
0answers
47 views
How to Copy the Contents of a DirectX Stream-Output Buffer to a Vertex Buffer?
I'm writing a very simple particle system in DirectX using the SharpDX wrapper. I use a constant buffer to pass a delta time to the vertex shader, which updates the position of the particles by simply ...
1
vote
0answers
32 views
SharpDX Error 'The Parameter is Incorrect', how to debug from dx?
I have written some code to handle a DX device. When the code is finished and makes it's call to DX the DX engine is complaining. What I'm looking to understand is how one goes about debugging on the ...
1
vote
0answers
93 views
How to Convert DirectX Texture2D to a DXGI Surface for WPF Rendering?
I have an image in my WPF application that uses a D3DImage to render DirectX content. On the DirectX side I render everything to a Texture2D using SharpDX (a C# DirectX wrapper), but I'm not sure how ...
3
votes
0answers
32 views
Flicker when drawing multiple shapes over image based texture
I'm rendering video frames with multiple color filled shapes over it using SharpDx and D3D11.
Rendering seems to be fine when just rendering the video frame and is as expected.
Now if i draw a ...
0
votes
0answers
26 views
How to write array of rgba to RenderTarget as a bitmap?
I have data in rgba format that I want to display as an image in my OnRender() method. I would like to do something similar to this:
// initial data
int [][] rgba;
...
0
votes
0answers
43 views
Quad not rendered correctly after window resize
I have a orthographic camera. With the help of this camera i'm able to render a quad onto the screen using screen-cordinates.
Using the camera i perform the zoom in/out on specific mouse position ...
1
vote
0answers
100 views
How to draw SharpDX 2D Bitmap Outline
i want drawing bitmap outline
Now Drawing
Device.DrawBitmap(mBitmap, GetBound(), Opacity, d2.BitmapInterpolationMode.Linear);
// mBitmap as SharpDX.Direct2D1.Bitmap
// GetBound() as Bitmap Bound
0
votes
1answer
132 views
Zoom at a specific point using Orthographic camera
Currently I can perform Zoom which seems to be working fine but essentially what I'm really trying to do is zoom on a position offset from center as currently when I zoom then zoom is performed at the ...
3
votes
1answer
101 views
Why is quad rendered at the center (0,0) instead of top left when using orthographic projection
I have been trying to render a quad(containg a texture) using orthographic camera so that the quad can be rendered using the screen coordinates directly.
I started of by rendering just a triangle ...
2
votes
0answers
153 views
Struggling with simple orthographic projection for a 2D setup
I'm trying to build a simple setup for 2D using SharpDX. Basically I want to supply my vertices in classic Cartesian coordinates: X-right, Y-up, starting with (0,0) in bottom-left corner. I've had ...
0
votes
0answers
119 views
How to get XAudio2 to loop a file?
I am having trouble getting XAudio2 in SharpDX to loop a file I am loading. Class level variables are:
Private svc As XAudio2.SourceVoice
Private buffer As XAudio2.AudioBuffer
Private ss As ...
3
votes
0answers
86 views
Nothing drawn in Window, not even the clear color
A few years ago I have followed RasterTek's Direct3D11 tutorials to create a simple application in C++. I'm not trying to convert this very simple sample to C# using SharpDX.
I've got the Window (...
2
votes
1answer
244 views
How can I get the color of a pixel in a SharpDX Direct2D bitmap or render target?
I am working on a simple drawing game and I need to get a Flood Fill algorithm working for a Paint Bucket tool.
I have the game running on WinForms at the moment which is extremely slow, but I have a ...
0
votes
0answers
121 views
Update part of dynamic Vertex Buffer. SharpDX
I'm creating application to draw simple 2D charts in a fast way.
Updating my VertexBuffer is implemented as below:
Device.ImmediateContext.MapSubresource(_signalVertexBuffer, MapMode....
1
vote
0answers
45 views
Retrieving shared video memory using SharpDX
I am trying to retrieve the total available video memory using SharpDX via DXGI, using the Description of the best available adapter.
The DedicatedVideoMemory is correct (1GB in my case), but the ...
1
vote
1answer
132 views
Keyboard.GetState() only work first time, and Memory increase (not Disposing) [closed]
EDIT UPDATE 3
I been searching the web for a solution and found several people struggling with Memoryleak using MonoGame while trying to dispose objects.
It could be the case that MonoGame should be ...
2
votes
1answer
599 views
SharpDX / DirectX: How to render text to a transparent BitmapRenderTarget?
I'm trying to render text to a BitmapRenderTarget, cleared with transparent color.
My TextBox is drawn on its own SharpDX.Direct2D1.BitmapRenderTarget, which I create in this way:
var ...
1
vote
0answers
108 views
SharpDX - Character Skinning Different in Windows Phone 8.1 Emulator and Real Device
I have an engine written using SharpDX, that can load a character mesh and animation stored in a FBX file, then it renders a scene and animates a character. It is written as an Universal Windows Store ...
0
votes
1answer
96 views
Converted XWM(A) files get silence at the end
I am writing a playback mechanism for looping background music with XAudio2 and SharpDX.
I converted some perfectly looping WAV files to XWM(A) with the xWMAEncode command line utility (from the DX ...
2
votes
1answer
123 views
Second pass in multipass effect is ignored
I am trying to render my vertecies in 2 passes, but it seems I am doing something wrong, because only one pass applying. I cannot make the second one work despite that second pass is applying.
Here ...
0
votes
0answers
341 views
Freeing texture memory in SharpDX - what am I missing?
I'm having a torrid time trying to resolve an issue whereby my total GPU memory consumption keeps rising throughout the course of my application, until the application fails with a DX out of memory ...
0
votes
1answer
435 views
Sharpdx DirectX11 MapSubresource is failing trying to map a staging texture
I'm trying to render to a texture and then pull the image data out. I've created one texture as a render target and another as a staging texture. After rendering to the render target, I use ...
3
votes
1answer
839 views
rendering an image within c# & sharpdx dirext3d9 [game overlay]
I'm following this guide and the related blog post to implement a basic game overlay for DirectX 9 games using SharpDX.
So the tutorial already have an example for text rendering but I need to be ...
1
vote
0answers
218 views
How can I use a SharpDX.Toolkit.Game in multiple WPF controls?
I've implemented a Game class in a WPF app. It works and the animation renders.
I have task to implement another several Controls with SharpDX in the same application window. Each new Game object ...
0
votes
0answers
103 views
XAudio not playing sound until MessageBox is cleared
I am building a fairly simple game in vb.net using sharpdx to access xaudio2 from .net. I am having an issue were if I play a sound using my audio wrapper library and then display a MessageBox soon ...
5
votes
1answer
479 views
Modifying depth values in PixelShader (SharpDX)
I'm relatively new to DirectX, and am currently converting some WPF 2D graphics code that displays geo-located sonar returns. I am using SharpDX, and rendering via a D3DImage.
I've got the basics ...
0
votes
1answer
270 views
SharpDx Custom effect in SpriteBatch
I'm trying to port a blur effect from an XNA project over to SharpDx, and I get a "Null Reference Exception" wich I'm unable to find the reason for.
private void blurShadow(RenderTarget2D to, ...
1
vote
0answers
208 views
Geometry shader: Dynamic output?
I'm currently using a geometry shader to generate grass blades out of single root points that are layed out in a grid. For each root point, I generate a grass blade with, right now, a constant number ...
1
vote
0answers
359 views
Why do I get an 'invalid call' error when creating an R8G8B8 volume texture?
I'm trying to create a VolumeTexture in C# with SharpDX, but it fails:
var form = new RenderForm("SharpDX - Test");
var device = new Device(new Direct3D(), 0, DeviceType.Hardware, form.Handle, ...
1
vote
1answer
196 views
How to setup a particular blend state where the alpha channel is additive?
I would like to set a blend state to be "additive" and do the following:
Result.R = Source.R + Destination.R;
Result.G = Source.G + Destination.G;
Result.B = Source.B + Destination.B;
Result.A = ...
1
vote
1answer
243 views
How can I fill a Color[] from a Texture2D given a Rectangle in SharpDX?
I used to fill a Color[] using XNA's
Texture2D.GetData<T>(int, Rectangle?, T[], int, int)
method, but there doesn't seem to be an equivalent overload on SharpDX's Texture2D. Anyone know how I ...
0
votes
0answers
38 views
How can I have an RPG character redirect / glance off stationary objects and keep going? [duplicate]
I am attempting to create an effect in a game that is identical to the effect I've shown in the attached gifs. Essentially, the character, when they are running or walking and hit an object that is ...
0
votes
1answer
457 views
How to export FBX models to use in SharpDX?
I am trying to export a model from 3ds Max 2014 as a fbx file and use it in my SharpDX driven project.
In the SharpDX example solution, there is a project named ModelRendering.Desktop. I just modified ...
2
votes
1answer
361 views
XNA/MonoGame/SharpDX: Pixel shader with sprite sheet
I've searched around for two days now on the internet but cannot find a solution. I've also read up on Pixel Shaders on MSDN with no luck.
I'm trying to apply a simple pixel shader to a sprite batch ...
1
vote
1answer
1k views
MonoGame SharpDX Error 'The Parameter is Incorrect' when using graphics.DrawUserPrimitives [closed]
Below is a small section of code that is meant to draw a multicolored triangle to the middle of the screen in a MonoGame game. This uses the basic function DrawUserPrimitives to draw the triangle. ...
2
votes
1answer
68 views
Vertex definitions and shaders [closed]
I noticed that from looking at other examples like say .. riemers tutorials he takes a buffer with a bunch of vector3's in it and ties it to a shader which expects a float4 ... why does this work in ...
4
votes
1answer
1k views
How do I output a webcam stream to a 2D canvas with SharpDX in C#?
I'm writing an application for the Oculus Rift using the SharpOVR library to access HMD position data. I decided it is reasonable to use SharpDX to also output webcamera streams.
Unfortunately, all ...
0
votes
0answers
325 views
SharpDx from Nuget
I'm trying to get the SharpDx DLLs from Nuget instead of accessing the DLLs directly, and it is a nightmare for me - I've spent several hours on this task already.
If I do this:
Create a clean ...
0
votes
1answer
674 views
HLSL - can't get texture to wrap or mirror
I'm currently converting an app from XNA to SharpDx and I'm therefore upgrading my shaders to version 4 (vs_4_0/ps_4_0).
When using this sampler:
SamplerState MySampler
{
Filter = ...
1
vote
1answer
87 views
Why does this no longer render the “test tri”? [closed]
So I got this code about rendering a shaded tri using sharpDX ...
var vertexShaderByteCode = ShaderBytecode.CompileFromFile("MiniTri.fx", "VS", "vs_4_0", ShaderFlags.None, EffectFlags.None);
var ...
2
votes
1answer
2k views
How can I create a buffer suitable for dynamic updates in SharpDX?
I want to set a buffer that is updated every frame but can't figure it out, what i have to do.
The only working thing i have is this:
mdexcription = new BufferDescription(Matrix.SizeInBytes * ...
3
votes
1answer
188 views
Anisotropic and trilinear filtering?
I'm confused about the usage of trilinear filtering and anisotropic filtering in SharpDX.
As far as i understood, trilinear filtering does linear filtering to the textures and in a case of LOD-change ...
0
votes
0answers
130 views
Pixel Shader : Backbuffer is 'Black'
After Fiddling around I am pretty sure this is not a Shader issue.
Edit 4:
The only diference I can see is that BasicEffect calls these methods before drawing:
// Make sure that domain, hull and ...
1
vote
1answer
727 views
How do I create a camera?
I am trying to create a generic camera class for a game engine, which works for different types of cameras (Orbital, GDoF, FPS), but I have no idea how to go about it.
I have read about quaternions ...
2
votes
1answer
391 views
Achieve anisotropic filtering
I want to set anisotropic filtering to my scene. I use SharpDX (DirectX 11) and C#.
How do i set up anisotropic filtering in my shader?
Currently i try that in the shader:
Texture2D tex;
sampler ...
0
votes
1answer
559 views
Multiple joysticks event handling [closed]
I want to make a game which is totally same idea as "Who pressed the button answers the question".
I have 2 joysticks and both are connected to a pc. My application will be Winforms and I will ...
1
vote
1answer
985 views
How do I set up a depth buffer in SharpDX?
I draw some instanced cubes, but when i rotate the camera (or the world) some cubes that should be behind other cubes are drawn before the cubes.
I already had this issue a long time before and i ...
1
vote
2answers
860 views
Drawing cube in SharpDX, wrong perspective
I want to draw a cube. This is what i currently have:
As you can see, the perspective is VERY wrong. The the size in the z-direction is too small and the difference between the front and back size ...