1
vote
2answers
141 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
89 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
150 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
61 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 ...
0
votes
1answer
93 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 ...
0
votes
1answer
143 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 ...
0
votes
1answer
288 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 ...
0
votes
1answer
412 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 ...
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
747 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 ...
2
votes
1answer
864 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
1answer
890 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
511 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
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 ...
1
vote
1answer
493 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
116 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
382 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
272 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
198 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
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(); ...
0
votes
1answer
266 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 ...
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 ...
2
votes
2answers
893 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 ...
5
votes
4answers
210 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 ...
8
votes
1answer
711 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 ...
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. ...
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 ...
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 ...
0
votes
1answer
379 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
424 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 ...
2
votes
1answer
732 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 ...
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 ...
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 ...