The tag has no wiki summary.

learn more… | top users | synonyms (2)

0
votes
1answer
67 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. However, in D3D10, if I set the swap chain descriptor's ...
0
votes
2answers
74 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
664 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 ...
0
votes
0answers
179 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 PS_INPUT must be ...
0
votes
2answers
67 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
55 views

parsing normals from OBJ problem

my attempt at loading obj and calculating normals per vertex is not working: getline(OBJfile, line); istringstream iss(line); iss >> x >> ...
1
vote
1answer
168 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
220 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 multithreaded routines make the textures ...
1
vote
1answer
126 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
100 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 uint4 values : UINT4_0; // VertexInput Input layout { "UINT4", 0, ...
0
votes
1answer
79 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
173 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
69 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
324 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
95 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
436 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
188 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 ...
1
vote
0answers
106 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
149 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
1k 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 ...
9
votes
4answers
1k 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
521 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: D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV, CONST D3D10_VIEWPORT ...
4
votes
1answer
727 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
5k 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. Build started 9/10/2012 10:22:46 PM. 1>Project ...
0
votes
1answer
315 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 ...
12
votes
3answers
2k views

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

http://msdn.microsoft.com/en-us/library/windows/desktop/bb206271(v=vs.85).aspx Why? Are there inherent drawbacks to working with triangle fans?
5
votes
1answer
257 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 ...
-5
votes
1answer
474 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
670 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
470 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
91 views

InputLayout handling [duplicate]

Where are you supposed to store InputLayout? Suppose i have some basic structure like. class Mesh { List<MeshPart> MeshParts } class MeshPart { Effect Effect; VertexBufferBinding ...
6
votes
2answers
2k 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
828 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
2answers
1k 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
701 views

Dynamic vertex buffer mapping call order

From the book Introduction to 3D Game Programming with DirectX10: // Update the vertex buffer with the new solution. Vertex* v = 0; HR(mVB->Map(D3D10_MAP_WRITE_DISCARD, 0, (void**)&v )); ...
1
vote
0answers
201 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 ...
2
votes
1answer
1k 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
939 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 ...
3
votes
1answer
750 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: depthBufferDesc.Width = screenWidth; depthBufferDesc.Height = ...
2
votes
1answer
167 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: //some vertex shader and globals goes there. skip them to preserve ...
0
votes
1answer
176 views

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

This image describes the problem I'm having: http://i42.tinypic.com/282kzlf.jpg What you are seeing consists of two images: Image A(with the alien-concept art thingy), depth value .98, the white ...
1
vote
1answer
1k 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
552 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 ...
2
votes
3answers
2k 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 ...
4
votes
1answer
356 views

Running geometry shader only once

(Unfortunately couldn't find the answer myself) Does a neat way to cache the geometry shader results in Direct3D10 or OpenGL exist? (preferably Direct3D10). I'm building my geometry based on texture ...
1
vote
1answer
221 views

How can I profile and debug my usage of D3D10?

I've been working on D3D 10 for about 6 months and I have accumulated a basic framework. The thing is I get frame rate spikes. Even when I have a simple cube on the screen each side with its own ...
1
vote
1answer
495 views

How can I extend this graphics code to draw more vectors of vertices?

I want to include the drawing of other vectors of vertices in the following code, in a number of places it seems easy enough to simply add or multiply size()s of the two vectors, for instance in the ...
0
votes
1answer
121 views

vector.size() instead of literal type breaking my draw code

I'm writing a simple class to draw all the debugging lines I have in my scene at once. The code in the draw loop is this so far: (If I put for example, 2 instead of temporary2DVerts.size() where I ...
0
votes
1answer
407 views

D3DXVec3Project returns odd values

I would have thought that if the object is on-screen that this function should return screen coordinates. When used in conjunction with the directX draw text function, it works fine. Textual overlays ...
1
vote
1answer
278 views

screen coordinate not working with pixel values

I have a very simple effect file shown below. I am using this to draw 2D lines, however it is not behaving how I expected and I can't seem to get my head round why. If I draw a line that goes from ...