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
2 answers
35 views

Handling pipeline objects in both DX12 and Vulkan like graphics APIs

I have been using OpenGL and Directx11 extensively for my engine. The thing is when I wanted to support DX12 or Vulkan I realized that they collect all the state data in one place removing the update ...
user avatar
  • 48
0 votes
1 answer
40 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 ...
user avatar
0 votes
1 answer
693 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 ...
user avatar
  • 3
1 vote
1 answer
114 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 ...
user avatar
0 votes
1 answer
568 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 ...
user avatar
  • 121
4 votes
1 answer
738 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 ...
user avatar
0 votes
1 answer
407 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 ...
user avatar
0 votes
3 answers
377 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 ...
user avatar
2 votes
1 answer
102 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)...
user avatar
  • 121
1 vote
1 answer
2k 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....
user avatar
0 votes
2 answers
380 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. ...
user avatar
8 votes
3 answers
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 ...
user avatar
0 votes
2 answers
514 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 ...
user avatar
-1 votes
1 answer
192 views

parsing normals from OBJ problem

my attempt at loading obj and calculating normals per vertex is not working: ...
user avatar
  • 69
3 votes
1 answer
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: ...
user avatar
  • 2,244
2 votes
2 answers
2k 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 ...
user avatar
1 vote
1 answer
666 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 ...
user avatar
0 votes
1 answer
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 ...
user avatar
0 votes
1 answer
234 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 ...
user avatar
1 vote
2 answers
2k 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 ...
user avatar
2 votes
1 answer
485 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 ...
user avatar
2 votes
1 answer
3k 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 ...
user avatar
  • 61
0 votes
1 answer
123 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 ...
user avatar
-1 votes
1 answer
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 ...
user avatar
1 vote
1 answer
435 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,...
user avatar
  • 11
1 vote
0 answers
139 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 ...
user avatar
  • 111
0 votes
1 answer
237 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 ...
user avatar
3 votes
1 answer
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 ...
user avatar
14 votes
5 answers
6k 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 ...
user avatar
4 votes
2 answers
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: ...
user avatar
  • 145
4 votes
1 answer
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 ...
user avatar
2 votes
3 answers
12k 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. ...
user avatar
  • 163
0 votes
1 answer
531 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 ...
user avatar
16 votes
3 answers
6k 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?
user avatar
5 votes
1 answer
455 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 ...
user avatar
  • 94
-7 votes
1 answer
799 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 ...
user avatar
  • 9
0 votes
2 answers
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 ...
user avatar
  • 9
0 votes
1 answer
736 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 ...
user avatar
1 vote
0 answers
95 views

InputLayout handling [duplicate]

Where are you supposed to store InputLayout? Suppose i have some basic structure like. ...
user avatar
  • 911
6 votes
2 answers
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 ...
user avatar
  • 611
0 votes
1 answer
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 ...
user avatar
3 votes
0 answers
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 ...
user avatar
  • 43
1 vote
1 answer
923 views

Dynamic vertex buffer mapping call order

From the book Introduction to 3D Game Programming with DirectX10: ...
user avatar
  • 448
1 vote
0 answers
231 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 ...
user avatar
6 votes
2 answers
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. ...
user avatar
  • 161
5 votes
1 answer
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 ...
user avatar
  • 51
4 votes
1 answer
2k 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: ...
user avatar
2 votes
1 answer
181 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: ...
user avatar
0 votes
1 answer
236 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 ...
user avatar
  • 448
1 vote
1 answer
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: <...
user avatar
  • 3,280