Questions which are specifically related to version 9.0 of DirectX SDK. If your question is not specific to this version of SDK (i.e. it could apply to DirectX 10 and 11 as well), use the 'directx' tag.
0
votes
0answers
139 views
Porting simple FFP bumpmapping to HLSL
I'm trying to port some antiquated D3D8 Dot3 bumpmapping code from fixed function calls to an HLSL shader. The original code looks like the following:
dev->SetTextureStageState (0, D3DTSS_COLOROP, ...
9
votes
3answers
877 views
Pixel-perfect rendering to a rendertarget with a fullscreen quad
I have some trouble rendering a bunch of values to a rendertarget. The values never end up in the exact range I want them to. Basically I use a fullscreen quad and a pixel shader to render to my ...
1
vote
3answers
268 views
How to remotely debug a D3D9 application
I've got a D3D9 application, which works fine on my machine. But when I send it to a friend, his machine won't render any of the 3D content. I already changed the build to enable all error-code ...
0
votes
1answer
95 views
Calculating other objects based on the transform of another
What I want to do is create my graphics to be independent of the game framework. So basically the graphics won't know anything until it is told where things are. so the thought was that every ...
0
votes
0answers
131 views
Setting a Direct3D world matrix by an array
Outside of the DirectX class I have objects that hold their own transform matrix (this is calculated every frame by the physics system) held in a linear array of floats
//rotation Mat|Position
[m0, ...
1
vote
2answers
343 views
DirectX Flicker
I'm using DirectX 9 via SlimDX (C#). My screen flickers a lot during rendering. I dug a little deeper and see that the surface is being cleared early. Here's an example:
...
1
vote
1answer
145 views
Present fails randomly on mixed C++ Direct3D9 app
I have a mixed .NET application (managed and unmanaged code bridged by C++/CLI wrappers) which uses unmanaged Direct3D9 9.0c to do rendering inside a control which is wrapped inside a C++/CLI class ...
6
votes
3answers
761 views
What is a better abstraction layer for D3D9 and OpenGL vertex data management?
My rendering code has always been OpenGL. I now need to support a platform that does not have OpenGL, so I have to add an abstraction layer that wraps OpenGL and Direct3D 9. I will support Direct3D 11 ...
1
vote
2answers
402 views
D3D9 Alpha Blending on the surfaces
I have a surface (OffScreenPlain or RenderTarget with D3DFMT_A8R8G8B8) which I copy pixels (ARGB) to, from a third party function. Before pixel copying, Bits are accessed by LockRect.
This surface is ...
0
votes
0answers
126 views
DirectX9 dynamic rendering
What I am planning to do is have the models (or maybe just an identifier for the model to be used) stored outside of the directX9 framework, and so in nature have completely dynamic rendering.
All ...
0
votes
0answers
128 views
Anti-aliasing works for debug runtime but not retail runtime
I'm experimenting with setting various graphical settings in my Direct3D9 application, and I'm currently facing a curious problem with anti-aliasing. When running under the debug runtime, AA works as ...
1
vote
1answer
409 views
Drawing lines in 3D space
When attempting to draw a line in 3D space with D3DPT_LINELIST, then Direct3D gives me an error about an invalid vertex declaration, saying that it cannot be converted to an FVF. I am using the same ...
9
votes
1answer
180 views
Implementing invisible bones
I suddenly have the feeling that I have absolutely no idea how to implement invisible objects/bones.
Right now, I use hardware instancing to store the world matrix of every bone in a vertex buffer, ...
0
votes
2answers
158 views
Direct3D9 application won't write to depth buffer
I've got an application written in D3D9 which will not write any values to the depth buffer, resulting in incorrect values for the depth test. Things I've checked so far:
D3DRS_ZENABLE, set to TRUE
...
0
votes
3answers
210 views
Constant size geometries
How can I display objects in a 3D perspective projection that look like as if their size does not change, despite of the camera's position?
I am using DirectX 9.0. I know of PositionTransformed ...
2
votes
2answers
176 views
Why does my win32 call, contained in a Class method, fail?
Using a Direct3D Tutorial, I took the knowledge and encapsulated it into a class. The code builds in MSVC 2010 fine, and I've handled all compiler warnings pertaining to my project with the highest ...
1
vote
2answers
473 views
Can't get debug spew for Direct3D9
The Direct3D9 debug runtime's debug output does not appear to be working correctly. I linked against d3dx9d.lib instead of d3dx9.lib and defined D3D_DEBUG_INFO and I also set the debug runtime on in ...
1
vote
1answer
107 views
Using ColorFill on a depth buffer
I'm trying to implement a render abstraction over Direct3D9, and one of the functions I'm implementing is clearing a render target, which includes a depth buffer. However, the ...
1
vote
1answer
298 views
Reading and writing an anti-aliased texture in Direct3D9
I'm slightly confused about textures versus surfaces in Direct3D9. Now, it seems fairly simple that you can only read from a texture and only write to a surface, and when you create a texture then you ...
2
votes
1answer
529 views
GPU particle system using vertex texture fetch in Direct3D9
I've been reading up on particle systems amongst other stuff and one interesting approach uses rendertargets to store a particle's position, velocity, lifetime, etc. A pretty neat summary is given ...
1
vote
1answer
477 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:
...
2
votes
1answer
1k views
Does the latest DirectX SDK support both Direct3D 9.0c and 11?
1) What is the latest version of DirectX SDK?
2) For my purposes I need DirectX 9.0c SDK and DirectX 11 SDK. Do I need to install these libraries separately or last DirectX SDK package contains both ...
1
vote
0answers
105 views
How to update a mesh position base on a pressed key?
I have a mesh loaded from a file, like a tiger mesh. At the first time it locates at A position, then if I press a left key, it will moves to B position but the problem is if I press a left key one ...
5
votes
4answers
197 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
1answer
312 views
What are the GPU requirements for XNA 4.0?
I tried to build a sample application using XNA, but I got an error saying that Pixel Shader 1.1 was required, so I got a used Radeon X300 GPU that supports Pixel Shader.
I tried to build it again, ...
2
votes
2answers
300 views
How can one access the depth buffer for Unreal Tournament 2004?
I'm looking for a way of getting depth buffer data for a virtual 3D sensor.
Currently the method used is raycasting (implemented in UnrealScript), but I want to use the depth buffer data instead for ...
3
votes
1answer
460 views
Why do Pool.Default D3D volume textures take memory from my process?
I am working on a Direct3D rendering application that uses a lot of texture RAM. I notice that if I allocate a Pool.Default volume texture:
_texture = new VolumeTexture(device, size.Width, ...
4
votes
2answers
2k views
Rendering skinned model with DirectX
I'm learning character animation with DirectX 9, and I'm new to 3D programming too.
I'm trying to use examples with my model that I'll be working with. They are from the book Character Animation with ...
2
votes
1answer
363 views
Hemicube algorithm d3d9 or d3d11, float valued colors
The hemicube algorithm renders the scene to 5 sides of a half-cube, from the perspective of each polygon.
Assume you place the hemicube around me and render to the 5 sides. The idea is, we can see ...
2
votes
2answers
517 views
About Alpha blending sprites in Direct3D9
I have a Direct3D9 application that is rendering ID3DXSprites. The problem I am experiencing is best described in this situation:
I have a texture that is totally opaque.
On top of it I draw a ...
0
votes
0answers
338 views
How can I make a 32 bit render target with a 16 bit alpha channel in DirectX?
I want to create a render target that is 32-bit, with 16 bits each for alpha and luminance. The closest surface formats I can find in the DirectX SDK are:
D3DFMT_A8L8 // 16-bit using 8 bits each ...
-2
votes
2answers
270 views
What are some good combinations of libraries?
Lately I have been working on a game that i plan to make online. I have used different libraries to make this game as far as i could, but I feel that I should rethink on how Im sertting this game up, ...
1
vote
1answer
500 views
terrain grid rendering problem
I'm using DirectX 9 and attempting to write a simple terrain generation object.
I'm running into trouble with the rendering - I'm hoping that this is a common problem, and someone could spot the ...
4
votes
4answers
1k views
How to implement transition between screens
Last night I showed my game to my friends and they said it was a bit jumpy.
The example he gave was in the pokemon games when a battle starts music plays, the screen flashes then pixels out then the ...
2
votes
1answer
414 views
DX9 sprite / font draw depth order
I need the ability to order the drawing of sprites and fonts. Some sprites need to be drawn behind and some in front of text. My problem is that my sprites and fonts use separate Begin() End() calls ...
1
vote
2answers
531 views
Creating a full-screen window in Windows API
I've got a Windows API Window. I've managed to make it windowed, and "fullscreen windowed". But I can't seem to make the window just full-screen- for example, even if I specify WS_POPUP, I can still ...
8
votes
4answers
1k views
In a 2d tile based game, what is a good method for scrolling?
I am using Direct3D with the D3DXSPRITE wrapper to draw the tiles to the screen. I have a tile class which contains members such as collision and tile type, then i have an array of tiles e.g.
Tile ...
5
votes
2answers
719 views
Different number of lights => different shader
I have a shader that computes lighting for each light.
PointLight PointLights[10];
uniform const float NumPointLights;
for(int i = 0; i < NumPointLights; i++)
{
lightVec = ...
3
votes
2answers
417 views
How to check Early Z efficiency on AMD GPU with Windows 7
I have a game using DirectX 9, and a development station using Win 7 x64. I am still able to get access to another station with Vista x64 / dual booted with WinXP x86.
I wanted to check early Z ...
5
votes
2answers
951 views
3D primitive rendering library
I am looking for a library which would easily allow me to render shapes (cubes, spheres, lines, circles, etc.) in 3D3 and OpenGL if possible. I want to be able to rapidly design visual debugging tools ...
2
votes
1answer
819 views
Direct3D Error Code 80070057
I'm getting a failure returned when calling Direct3DDevice->CreateDepthStencilSurface(). But rather than returning one of the values that the documentation says it should return (D3DERR_NOTAVAILABLE, ...
6
votes
1answer
265 views
Hardcoding C++ shader interop code
When writing code that interacts with multiple shaders, is it best practice to hard code the use of each effect? I wrote a couple of hard-coded loops and then noticed that I accidentally ended the ...
1
vote
1answer
261 views
Changing render target within an effect
I've got an effect which is a fairly simple two-pass deal- but it involves rendering to a texture in the first pass. Is it possible to change the render target from within an effect? I would ...
4
votes
2answers
787 views
How can I render text above a mesh in DirectX 9?
I want to render some text over a mesh in my DirectX app. It will have a similar application to health bars for units in games, just as text rather than a bar. I'm looking for the simplest way to do ...
2
votes
1answer
374 views
D3D9 Effects- variable parameters
I've created some simple Phong shading code from a sample. The issue is that the sample only handles one light. If I wanted a variable number of lights set at the start of each frame, how could I ...
1
vote
2answers
237 views
What is the Xbox360's D3DRS_VIEWPORTENABLE equivalent on WinXP D3D9?
I posted this on StackOverlow, but of course it should be posted here.
I am maintaining a multiplatform codebase for Xbox360 and WinXP. I am seeing an issue on the XP side that appears to be related ...
2
votes
2answers
828 views
Rendering with Direct3D
I'm slightly confused about how Direct3D rendering works. Basically, as long as I render to one surface, everything is fine. But when I try rendering to multiple surfaces, it seems like everything is ...
4
votes
2answers
3k views
2D graphics with Direct3D
I'm trying to work with 2D graphics using Direct3D 9, but am not sure where to start. Right now I'm using a texture as the "draw buffer", and drawing that texture to screen. For the simplest things, ...
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 ...
3
votes
4answers
815 views
How do I convert DirectX's .X from binary encoding to text encoding and back
As far as I know, .X format can be text encoded and binary-encoded.
I basically want to look into the model I'm playing with, get a better understanding of .X, possibly make some changes in it and ...