The directx10 tag has no wiki summary.
0
votes
1answer
82 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
120 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
434 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
200 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 ...
3
votes
1answer
201 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
3answers
1k 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
155 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 ...
10
votes
3answers
590 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
177 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
209 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
254 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
137 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
65 views
InputLayout handling
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
833 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
367 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
720 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
370 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
161 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
385 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
495 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
441 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
128 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
126 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
392 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
339 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
612 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
150 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
159 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
450 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
102 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
234 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
213 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 ...
0
votes
2answers
175 views
Are my lines instanced?
I have a class which "collects" line mesh transformations throughout the update and then draws them in one place by drawing one line over and over again. I'll post the code below. I'm just wondering ...
1
vote
2answers
171 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();
...
0
votes
1answer
147 views
LPD3DX10FONT::DrawTextA/W messes up the depth buffer!
why does calling this function mess up the depth buffer? I read somewhere that it cheekily changes the blend state, but to be totally honest I don't even know what that means. What is it doing, why is ...
2
votes
2answers
357 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
5
votes
1answer
467 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(
...
3
votes
1answer
663 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 ...
2
votes
2answers
543 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 ...
2
votes
2answers
216 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) ...
5
votes
4answers
188 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 ...
2
votes
2answers
1k 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 ...
7
votes
1answer
525 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 ...
1
vote
2answers
520 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.
...
1
vote
1answer
693 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 ...
3
votes
2answers
699 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 ...
0
votes
1answer
283 views
DirectXCollision.h missing
I am using DirectX10, June release and I am trying to
#include <DirectXCollision.h>
so that I can use the bounding objects, however it does not seem to be there. Am I missing something ...
-2
votes
2answers
314 views
ID3D10Device pointer problem
sorry in advance for the large chunk of code. 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 ...
0
votes
2answers
360 views
DirectX 10 - determining if hardware device is available
I am writing an offline renderer using SlimDX and Direct3D 10 that will need to be run on machines without graphics cards (servers). On these machines, I'll be using the WARP software renderer.
Is it ...
1
vote
1answer
148 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?