The tag has no wiki summary.

learn more… | top users | synonyms (2)

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?
10
votes
1answer
987 views

Simple Terrain Rendering

For some reason I can not find a good example of terrain rendering, as in like "bare bones". Im reading Introduction to game Programming with DX10, and i've seen some other tutorials....but they all ...
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 ...
8
votes
3answers
620 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 ...
8
votes
1answer
720 views

How can I implement a renderer that can draw many kinds of primitives?

This is somewhat linked to a question I previously asked concerning the drawing of indexed primitives. My problem was that I was only drawing one cube when I wanted to draw many. I was told that the ...
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 ...
5
votes
3answers
1k views

How to run DirectX10 on non-compatible hardware?

I'm going to be away for a little bit, bringing my netbook with me to do some basic DirectX10 stuff. How can I run DX10 on DX9.0c hardware?
5
votes
4answers
211 views

Is there any guarantee about the graphical output of different GPUs in DirectX?

Let's say that I run the same game in two different computers with different GPUs. If for example they are both certified for DirectX 10. Is there a guarantee that the output for a given program ...
5
votes
1answer
2k views

XNA or SlimDX (DirectX 10) for multitouch rhythm game simulator

I'm looking to develop a multitouch rhythm game in C#. It is aimed to be a simulator for an existing arcade game, similar to this: http://www.youtube.com/watch?v=TAiNNpA3wwg So far, I've decided on ...
5
votes
2answers
4k 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: ...
5
votes
1answer
891 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 ...
5
votes
1answer
236 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
763 views

On Creating a D3DX10 texture atlas

I have a DirectX10 texture (ID3D10Texture2D) that I load from disk with the following code: CComPtr<ID3D10Device> spD3D; // Initialized correctly elsewhere hr = D3DX10CreateTextureFromFile( ...
4
votes
1answer
1k views

What is instancing, and how can I update my graphics code to do it?

This question directly follows on from this one: How can I implement a renderer that can draw many kinds of primitives? I have a small amount of drawing code structured in the following way: A mesh ...
4
votes
2answers
472 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
354 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 ...
4
votes
1answer
647 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 ...
4
votes
1answer
241 views

Why does PIX suggest my frames are rendering out of order?

When my application goes into a fullscreen state my movement is not smooth. It seems like frames are not rendered in the correct order, doing something like: 1, 3, 2, 4, 6, 5, ... making the movement ...
3
votes
2answers
912 views

Converting from different handedness coordinate systems

I am currently porting a demo from XNA to DirectX which, as I understand it, both have coordinate systems with different handednesses. What are the things I need to bare in mind when converting ...
3
votes
2answers
1k views

Where have the cross and dot products gone in DirectX10?

In D3D9 there were functions to deal with D3DXVECTOR3's in order to calculate dot and cross products. However these have disappeared from the math library in D3D10. I assume they must have gone ...
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 ...
3
votes
1answer
711 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 = ...
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 ...
2
votes
3answers
1k 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 ...
2
votes
2answers
281 views

The Correct Usage of DLLs with a DirectX Game?

I'm using DirectX 10 (in C++) to make a game engine, and a test driver program on top of it. Now that I've written many messy rough drafts of an engine, I want to make the final (or sorta final) ...
2
votes
2answers
1k 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
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 ...
2
votes
1answer
682 views

What 3d mesh formats usable with DirectX10 are there?

I want to load a mesh into my game (written in C#, if this matters) but am not sure what mesh format to use. What mesh formats are there, how easy/hard it is to load them into DirectX10 and what's the ...
2
votes
1answer
244 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 ...
2
votes
2answers
2k views

Why isn't my mouse input working as expected in a DX10 game?

I've made myself a camera for a DirectX 10 game, and the keyboard control works fine. However, I can't see to get the mouse to work. My biggest problem is I can't find out how to hide the mouse on the ...
2
votes
1answer
165 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 ...
2
votes
2answers
773 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? Thanks
2
votes
1answer
744 views

Mesh with Alpha Texture doesn't blend properly

I've followed example from various place regarding setting OutputMerger's BlendState to enable alpha/transparent texture on mesh. The setup is as follows: var transParentOp = new ...
2
votes
1answer
66 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
1k 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 ID3DX10Mesh object ...
2
votes
1answer
894 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. ...
1
vote
3answers
1k views

Converting DirectX 9 code to DirectX 10

Preface: I purchased Programming an RTS in DirectX recently, and I know the code uses DirectX 9, but it has fantastic reviews and is apparently one of the best books you can get on beginning ...
1
vote
1answer
119 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
494 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 ...
1
vote
1answer
274 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 ...
1
vote
2answers
183 views

temperamental ID3D10EffectVectorVariable

I am setting an HLSL effect variable in the following way in a number of places. extern ID3D10EffectVectorVariable* pColour; pColour = pEffect->GetVariableByName("Colour")->AsVector(); ...
1
vote
1answer
175 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
1answer
914 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

How can I draw many objects on screen instead of just one?

Like many beginner graphics programmers I followed a tutorial which showed me how to set up buffer descriptions and fill out the vertex buffer etc... - the steps involved in drawing a simple indexed ...
1
vote
1answer
191 views

Where is ID3D10EffectShaderResourceVariable::SetResourceArray in SlimDX?

I don't know if I'm just not looking in the right place, but I can't find ID3D10EffectShaderResourceVariable::SetResourceArray anywhere in SlimDX. Anyone have any idea how I should be calling this?
1
vote
1answer
574 views

DirectX10 How to use Constant Buffers

I'm trying to access some variables in my shader, but I think I'm doing this wrong. Say I have a constant buffer that looks like this: cbuffer perFrame { float foo; float bar; }; I got an ...
1
vote
2answers
175 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
99 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 ...
1
vote
2answers
158 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 ...
1
vote
1answer
662 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 )); ...