Questions tagged [directx10]

DirectX 10 is the 10th version of Microsoft's DirectX API, which is used to develop and handle tasks related to Multimedia, such as game programming, 3D visualizations and video on Microsoft platforms.

Filter by
Sorted by
Tagged with
0
votes
1answer
28 views

How to perform alpha blending on saved raw argb videos(a image and a video will also work) using direct3d9 , direct3d10 or direct3d11?

I'm trying to perform alpha blending on videos using direct3d11. I've wrote the code snippet below to achieve this. I've tried to read the video file out2.argb frame by frame and store it in the ...
6
votes
2answers
2k views

Reading from a staging 2D texture array in DirectX10

I have a DX10 program, where I create an array of 3 16x16 textures, then map, read, and unmap each subresource in turn. I use a single mip level, set resource usage to staging and CPU access to read. ...
0
votes
1answer
474 views

SlimDX Direct3D10 Sprite stretches with window size

I'd like to draw a sprite bitmap with SlimDX Direct3D10, but I'm stuck at this problem, where I can see my image on screen, but it gets stretched depending on the window size. The issue looks like ...
3
votes
3answers
4k views

simplest way of making a sphere roll in a realistic way

rather than just moving a sphere across a plane, I want to make it roll like a ball. What is the simplest way of doing this? I assume it will have something to do with the circumference of the ball ...
0
votes
1answer
230 views

Rendering issue: depth buffering + blending: how do they work together?

This image describes the problem I'm having: What you are seeing consists of two images: Image A(with the alien-concept art thingy), depth value .98, the white parts on the image is where the alpha ...
0
votes
1answer
329 views

Set multiple render targets with OMSetRenderTargets using ComPtr<T>

I've recently decided to get rid of pretty much all of the raw pointers from my Direct3D code, and I ran into a problem with using ComPtr<T> template with ...
1
vote
1answer
93 views

Which DirectX Version to use for a low poly game?

Which DirectX Version (10, 11 or 12) is recommended to use, if you want to have a low-poly game with shaders, shadow and aliasing. But not normal or height maps. Moreover my question is, because once ...
16
votes
3answers
5k views

Why are triangle fans not supported in Direct3D 10 or later?

As covered in the documentation, triangle fans not supported in Direct3D 10 or later. Why? Are there inherent drawbacks to working with triangle fans?
4
votes
1answer
515 views

HLSL Buffer<> Data Type

I'm working on converting a dx11 shader from a .fx file for use in Unity3D and I'm a little puzzled by the HLSL Buffer<> type declared in the shader. More specifically, what are these and how can I ...
7
votes
2answers
9k views

Direct2d off-screen rendering and hardware acceleration

I'm trying to use direct2d to render images off-screen using WindowsAPICodePack. This is easily achieved using WicBitmapRenderTarget but sadly it's not hardware accelerated. So I'm trying this route: ...
3
votes
0answers
2k views

How to fix issue with my 3D first person camera? [closed]

My camera moves and rotates, but relative to the worlds origin, instead of the players. I am having difficulty rotating the camera and then translating the camera in the direction relative to the ...
0
votes
2answers
562 views

ID3D10Device Pointer Problem

Basically when placed in the same file this works fine, but if placed in separate files (and I have tested this) just after Init() is called, the pointer to ID3D10* device's value is suddenly ...
14
votes
5answers
5k views

Avoid if statements in DirectX 10 shaders?

I have heard that if statements should be avoid in shaders, because both parts of the statements will be execute, and than the wrong will be dropped (which harms the performance). It's still a ...
1
vote
1answer
77 views

DirectX 10 - dimension of vertices passed to vertex shader

I'm trying to learn DirectX programming. Looking at different tutorials there is something about vertices that I find a bit confusing. I know that DirectX uses vertices with four elements (x, y, z, w)...
0
votes
3answers
360 views

Is computing depth in a pixel shader bad? Can I reduce fillrate by moving depth calc to vertex shader?

I have a DX10 game that is fillrate bound. One of the things I've been realizing may be contributing to this is that I compute depth in the pixel shader (the game uses a logarithmic depth buffer to ...
0
votes
1answer
353 views

When does DirectX convert a vertex/pixel's depth from range Near-Far to 0-1?

When I output a vertex from a vertex shader, it seems to have a world-space-ish mapping. Vertices about 1 unit away have about 1 unit as their Z value. When we input into the pixel shader, the depth ...
0
votes
1answer
1k views

Automatically select back buffer format

In D3D9, you could set BackBufferFormat to D3DFMT_UNKNOWN in the presentation parameters and D3D would select the format for you....
0
votes
2answers
328 views

Disable lighting in DirectX10

I'm implementing a D3D10 version of my renderer (not porting to avoid losing Windows XP support). I didn't go straight to D3D11 because MSDN and other sources recommend upgrading to 10 and then to 11. ...
8
votes
3answers
3k views

Correct method for choosing the user's video cards?

My game uses DirectX 10, and I'm having a problem where users are reporting that my game isn't picking up on their graphics card. Instead it prefers to run on their integrated Intel card, ruining ...
2
votes
1answer
410 views

When should I clear an auxilliary render target?

I'm using a few different render targets in my game in addition to the back buffer. These other render targets are only used in a few places, for specific tasks. I'm wondering when I should be ...
1
vote
2answers
1k views

Load texture from different thread

I am trying to load textures from a different thread but it fails everytime on this following method: D3DX10CreateShaderResourceViewFromFile Turning off my ...
1
vote
0answers
1k views

Why do the order of struct members between vertex and pixel shader must be reversed?

This has been driving me crazy for the last two days but it is finally working, however I really don't see why the order of struct members should be reversed. Why do members of ...
0
votes
2answers
276 views

Cull mode back faces

When i draw a cube using indices, the faces of the cube are skewed but only when CullMode is set to cull back. When i switch it to cull none, it draws the cube perfect. Unfortunately i cant post any ...
-1
votes
1answer
175 views

parsing normals from OBJ problem

my attempt at loading obj and calculating normals per vertex is not working: ...
2
votes
2answers
2k views

How do I use D3DXVec3Normalize()?

It accepts two parameters, the first is an out parameter - a pointer type, so a referenced variable or a pointer to a variable - the second parameter is an in parameter of the same type but const. ...
2
votes
1answer
4k views

Difference between texture arrays and multiple single textures?

I've just learnt that DirectX 10 and above have a feature called "texture arrays". Which, basically, is just a normal array of textures (shader resources) which in a shader is declared like: ...
1
vote
1answer
515 views

Reuse VertexBuffer or new VertexBuffer object?

I'm trying to render bitmap fonts in directX10 at the moment, and I want to do this as efficiently as possible. I'm having a hard time getting a start on my design because of this question though. So ...
0
votes
1answer
1k views

How do you create an input layout for passing a uint4 to a vertex shader in D3D10?

I am trying to pass in a uint4 into the shader but my input layout keeps failing when trying to load the shader. shader.fx ...
1
vote
2answers
951 views

How can I repeat a portion of a texture on a quad?

I want to repeat a selected part of the texture into a quad. I was looking at this thread, however the solution involved changing my HLSL. Is there any way to do it without changing my shader ...
0
votes
1answer
199 views

How do I upscale my scene to a larger viewport?

I want to: Render my scene to a small viewport (some divisor of the full screen size). Stretch the rendered image to cover the full screen size. For example I want to render a complex, very slow ...
2
votes
1answer
2k views

DirectX11 Swap Chain RGBA vs BGRA Format

I was wondering if anyone could elaborate any further on something that's been bugging me. In DirectX9 the main supported back buffer formats were D3DFMT_X8R8B8G8 and D3DFMT_A8R8G8B8 (Both being BGRA ...
0
votes
1answer
121 views

Just 2 images on a window loaded using DirectX10…But how?

I am a beginner to DX and I have tried looking everywhere for something very similar to this concept but can't find anything. I just want two rectangles on a window. Rectangle 1 : on some x,y with ...
2
votes
1answer
2k views

How to load a mesh from the .X-format in DirectX10 via SlimDX?

As of DirectX10, the usual functions to load a mesh in the .X-format are marked as deprecated and they are DX9 functions anyway. How can I load a mesh from the .X-format into an ...
-1
votes
1answer
1k views

Why was the DirectX mesh interface removed? [closed]

I'm currently working with D3D 11 and if I understood it correctly, D3D 10 had a mesh interface built in to it which was removed in 11. If this is correct, why was the mesh interface removed? It ...
1
vote
1answer
407 views

SharpDX - How do I write multiple streams to Texture2D?

I'm working on a 3D map that is cut as a simple grid of textures. The idea is to draw only one object with all those textures, instead of having a tile object for each of them. Correct me if I'm wrong,...
1
vote
0answers
95 views

InputLayout handling [duplicate]

Where are you supposed to store InputLayout? Suppose i have some basic structure like. ...
1
vote
0answers
137 views

Rotate Points with Object in world space

I posted this in the original stack overflow then realized that a game-dev specific one exists. I am working on personal project that requires me to have 4 points surrounding an object (1 at each of ...
0
votes
1answer
231 views

Strange rendering in Direct3D 10 [closed]

I'm writing an application which renders graphics on the screen. The application can switch between Direct3D9 and Direct3D10 graphics modules (I wrote DLLs that wrap both D3D9 and D3D10). When trying ...
3
votes
1answer
3k views

Proper use of Dynamic Vertex Buffers for rapid update

I am creating a C#/SharpDx/DirectX10 application to plot line charts in a fast way. I have a prototype which uses Dynamic Vertex Buffers and fills a fixed-size buffer, say 1M vertices, with new data ...
4
votes
1answer
1k views

Write depth buffer to texture

I need to read depth buffer from GPU and write it to texture. How this can be done? Here is how texture for depth buffer is created: ...
2
votes
2answers
2k views

HLSL: how to get/set effectvariable to an array of structs with Direct3D10

HLSL Code: //Lights struct Light { float3 pos; float3 dir; int type; } m_aLights[3]; How can I get/set an effectvariable to m_aLights with Direct3D10?...
0
votes
2answers
1k views

How do I create a third Person View using DXUTCamera in DX10?

I am creating a 3d flying game and using DXUTCamera for my view. I can get the camera to take on the characters position, But I would like to view my character in the 3rd person. Here is my code for ...
4
votes
2answers
1k views

How do I use D3DXVec3Unproject with D3D11?

I'm having a small issue with D3DXVec3Unproject. I'm currently using Direct3D 11 and not 10, and the signature for this function is: ...
2
votes
3answers
11k views

error X3501: 'main': entrypoint not found

I am trying to learn DX10 by following this tutorial. However, my shader won't compile. Below is the detailed error message. ...
4
votes
1answer
2k views

Pass large array to pixel shader

I am trying to write a Pixelshader for a curve effect in Direct2d. A curve effect maps each color channel value to a different value by using a look up table. For this effect I would need to pass 3 ...
0
votes
1answer
507 views

Possible / How to render to multiple back buffers, using one as a shader resource when rendering to the other, and vice versa?

I'm making a game in Direct3D10. For several of my rendering passes, I need to change the behavior of the pass depending on what is already rendered on the back buffer. (For example, I'd like to do ...
5
votes
1answer
432 views

C++ unmanaged inside winform

First: I am using C# and C++ on windows 7. I have created a basic rendering engine in c++ with directx 10. It works good as a stand alone application. But, when I sending the Form.Handle of a WinForm ...
-7
votes
1answer
777 views

Where is my memory leak coming from? [closed]

This is a long shot ... but I'm going to paste in my code to see if anyone can figure out where my memory leak is coming from. It's a lot of code... so I advise you NOT to bother answering this ...
0
votes
1answer
724 views

Taking MSAA screenshot using D3DX10SaveTextureToFile()

I have some screenshot code (pasted below) which was working fine until I enabled MSAA. The first time I tried to use this code, it complained that the texture I'm creating needed to match the sample ...
6
votes
2answers
3k views

What advantages does DirectX 11 have over DirectX 10?

What advantages does DirectX 11 have over DirectX 10? Most of the new features seemed to be for directcompute from what I can tell, and how much more are you limiting your market by if you use DX11 ...