0
votes
0answers
26 views

Trying to render a texture on Windows.Forms.Panels

Using a SlimDX.Windows.RenderForm, I want to dynamically create a texture of a map of the US, copy that texture to 2 other textures, then draw unique radar data onto each texture. Then I will pass ...
0
votes
1answer
48 views

How can I check the shader model capabilities of an adapter?

I'm writing an application that targets Direct3D11 (through SlimDX) and shader model 5. When I'm running it on a system that doesn't have SM5 capable hardware, I will get a NullReferenceException ...
0
votes
1answer
231 views

Game only runs at 60fps in windowed mode with a 120hz monitor?

In fullscreen the game will run at 120fps fine, the correct refresh rate for the monitor, but in windowed mode it only runs at 60fps. If I disable VSync then it runs at thounsands of fps so it's not ...
0
votes
1answer
127 views

Accessing and changing texture data in SlimDX

How can I access and change texture data in SlimDX? I have a Texture2D and a Texture3D and I need to be able to go in and change either a single or group of pixels.
1
vote
1answer
199 views

How can I compile SM 3.0 effects in D3D11 in SlimDX?

var bytecode = ShaderBytecode.CompileFromFile("shaders\\testShader.fx", "fx_5_0", ShaderFlags.None, SlimDX.D3DCompiler.EffectFlags.None, null, null, out str); var effect = new ...
2
votes
1answer
442 views

How do you add rotation to particles?

Today I was working on a particle system and I can't figure out how to give the particle billboards a rotation (so to have them spinning clockwise or counter-clockwise while facing the player). I ...
1
vote
1answer
470 views

ERROR #342: DEVICE_SHADER_LINKAGE_SEMANTICNAME_NOT_FOUND

I've stared at this for at least half an hour now and I cannot figure out what directx is complaining about. I know this error normally means you put float3 instead of a float4 or something like ...
0
votes
1answer
1k views

Changing the culling mode in the HLSL effect

I'm writing a cel-shading effect in HLSL and Direct3D 11, and I need to be able to flip the culling mode on the outline pass of the effect. I know you do this in XNA by setting CullMode to CW or CCW ...
2
votes
1answer
962 views

Question about mipmaps + anisotropic filtering

I'm a bit confused here and maybe someone can explain this to me. I created a simple test texture for my terrain which is nothing more than a solid green color with a black grid overlayed on top of ...
0
votes
1answer
698 views

E_FAIL: An undetermined error occurred (-2147467259) when loading a cube texture

I'm trying to implement a skybox into my engine, and I'm having some trouble loading the image as a cube map. Everything works (but it doesn't look right) if I don't load using an ...
4
votes
1answer
535 views

Per-vertex position/normal and per-index texture coordinate

In my game, I have a mesh with a vertex buffer and index buffer up and running. The vertex buffer stores a Vector3 for the position and a Vector2 for the UV coordinate for each vertex. The index ...
1
vote
1answer
123 views

Drawback of using multiple bind flags

As far as I understand Direct3D 11 I have to specify certain BindFlags in order to use a resource in a specific stage of the pipeline. From my experience some combinations are more common like ...
0
votes
3answers
2k views

Adapting DirectX samples to SlimDX

I'm trying to learn DirectX and SlimDX but I'm having a terrible time getting started. I'm taking the Triangle tutorial and trying to add color and transformations. Starting with controlling color, ...
1
vote
3answers
204 views

Extracting blend values from uint32 not working as expected

I have the following shader configuration code : uint gBlendValue = 0xffffff00; Terrain.Effect.GetVariableByName("gBlendValue").AsScalar().Set(gBlendValue); And I have the following shader code : ...
4
votes
2answers
2k views

How can I draw dashed or dotted lines with a pixel shader?

I am trying to draw the 2D graphics (like line, polyline, polygon etc.) using Direct3D for drawing I am using LINE_LIST. Now I want to make the lines thicker and apply patterns to the line as ...
4
votes
1answer
2k views

How do I create a CPU read/write buffer in SlimDX (what are the legal combinations of Usage and CPUAccess flags)?

Currently, I create a vertex buffer in SlimDX like so: SlimDX.Direct3D11.BufferDescription Description = new SlimDX.Direct3D11.BufferDescription(); Description.BindFlags = ...
1
vote
1answer
785 views

Multiple Render Targets not saving data

I originally posted this question on stack overflow, but realised it might be better here. The original question can be found here I'm using SlimDX, targeting DirectX 11 with shader model 4. I have a ...
3
votes
2answers
1k views

Understanding DeviceContext and Shaders in Direct3D/SlimDX

I've been working through this tutorial about drawing triangles with SlimDX, and while it works, I've been trying to structure my program differently than in the tutorial. The tutorial just has ...