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
205 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
88 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 ...
0
votes
1answer
399 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 ...
4
votes
1answer
445 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 ...
0
votes
1answer
336 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
3answers
351 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 ...
1
vote
1answer
75 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
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
311 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
2k 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 ...
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
210 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
171 views

parsing normals from OBJ problem

my attempt at loading obj and calculating normals per vertex is not working: ...
2
votes
1answer
3k 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
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
1answer
481 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 ...
0
votes
1answer
194 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 ...
1
vote
2answers
807 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 ...
2
votes
1answer
389 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 ...
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 ...
-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
389 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
136 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
227 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 ...
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 ...
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: ...
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 ...
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. ...
0
votes
1answer
506 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 ...
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?
5
votes
1answer
425 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
766 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
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 ...
0
votes
1answer
718 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 ...
1
vote
0answers
94 views

InputLayout handling [duplicate]

Where are you supposed to store InputLayout? Suppose i have some basic structure like. ...
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 ...
0
votes
1answer
2k views

Render full-screen gradient or texture

What's the simplest way to fill the background of the screen with a gradient or a texture in Direct3D 10/11? I'm building a Windows 8 metro app in which the camera never moves and I render some ...
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 ...
1
vote
1answer
885 views

Dynamic vertex buffer mapping call order

From the book Introduction to 3D Game Programming with DirectX10: ...
1
vote
0answers
230 views

Batching Homogeneous Render Objects in XNA, 2D Component-Entity Engine?

I've been working on my component-entity engine for about 3 months now, and have managed to get nearly every constituent system working with little effort or compromise. My system has the following ...
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. ...
5
votes
1answer
1k views

Memory allocation strategy for the vertex buffers (DirectX 10/11)

I'm writing a CAD system. I have a 3D scene and there are many different objects (walls, doors, windows and so on). The user can add or delete objects. The question is: How do I keep track of all the ...
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
1answer
176 views

Multiple passes in direct3d10

I begin to learning direct3d10 and stuck with multiple passes. As input I have a triangle(that stored in vb/ib) and effect file: ...
0
votes
1answer
229 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 ...
1
vote
1answer
2k views

where have the shape drawing functions gone in DirectX10?

such as the CreateTeapot function - http://msdn.microsoft.com/en-us/library/windows/desktop/bb172798(v=vs.85).aspx Is there an equivalent in DX10? If so, how do I use it? In DX9 you.. Declared: <...
1
vote
1answer
1k views

what is the absolute simplest way to add physics to a simple 3D game

This physics does not have to be very complex at all. There are a number of rectangles and one ball, all of which have the appropriate bounding volumes constrained to them, it would be great if the ...