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.

learn more… | top users | synonyms (2)

4
votes
4answers
2k 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
575 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
957 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
975 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
540 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
1k 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 ...
3
votes
1answer
1k 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
302 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
294 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 ...
5
votes
2answers
1k 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
456 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
268 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
1k 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
5k 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
5answers
1k 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 ...
6
votes
2answers
2k views

How to implement SSAO in Shader Model 3/ DX9?

Ive read a few articles about SSAO, and i would like to implement it in to 3d engine at work, which runs on top of DX9. Can you give me an tips on getting the simplest implementation possible up and ...