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)

1
vote
1answer
22 views

16-byte aligned matrix in DirectX9 and D3DX with Havok Physics 2012

I want to ask a question about D3DXMATRIX and D3DXMATRIXA16, and how to use them with Havok Physics. I'm using Visual Studio 2012 on Windows 8. I successfully created an instance of hkpWorld, added ...
0
votes
0answers
8 views

How to parse animation data of a .x file in SlimDX

I have a managed Direct3D9 application that uses SlimDX. I need to implement a custom animation controller. I want to parse the .x file for animation data. The SlimDX.Direct3D9.XFile and ...
-3
votes
1answer
33 views

How to draw a sprite without black transparency key?

I would like some help with the following. At the moment when I draw the sprite I want it to be full black with no transparency, i.e. 255 alpha channel. But what I get is half transparency. How can I ...
0
votes
1answer
25 views

How to set a struct as a Direct3D9 vertex shader constant?

I have a vs_2_0 shader like this: struct ConstantBuffer { float4 diffuse; float4 specular }; shared uniform ConstantBuffer g_cb : app_constantBuffer; void PS(out float4 Color: COLOR0) { ...
1
vote
3answers
42 views

Grab depth buffer with unlockable D3DFORMAT

I'm currently piggy backing on a mod framework (Multitheft Auto) and trying to read the depth buffer in D3DFMT_D24S8 (DirectX9). I can read it if I change the format to D3DFMT_D32F_LOCKABLE and then ...
0
votes
1answer
28 views

FindNextValidTechnique fails

My effect file compiles successfully, but FindNextValidTechnique fails. Technique part of the shader: technique Diffuse { pass Pass0 { VertexShader = compile vs_2_0 ...
1
vote
0answers
47 views

Dynamically allocate memory for object array [closed]

I'm trying to create a RPG game and for a test I thought I might draw the same tile(20x20 pixels) over the whole window(720x480), it works and renders the tiles fine but the amount of memory and CPU ...
0
votes
1answer
80 views

How can I implement triple buffering using Direct3D 9?

I am creating an application using Direct3D 9. I want to implement triple buffering with vsync. I can successfully create a graphics device object with 2 back buffers. How do I know which buffer to ...
1
vote
1answer
76 views

How can I manually syncronize render calls with a monitor's refresh rate in Direct3D 9?

I have an application that utilizes Direct3D 9 to render 3D graphics. I'm trying to manually control the number of frames rendered in a given second. Here is pseudocode: while( bInGame ) { // ...
1
vote
1answer
141 views

How to draw an ellipse with DirectX 9?

I can draw the outline of an ellipse but I want to draw a filled in ellipse, but I can't seem to get the code to work. Any help would be great! I am using DirectX 9 and D3DX.
0
votes
1answer
95 views

PointSprite in DirectX9

I was trying to implement a particle system using PointSprites. Draw calls return D3D_OK but I don't see any particle on the screen. I'm not using Vertex Buffer for the particles, but I use two ...
0
votes
1answer
72 views

How to retrieve vertex information from ID3DXMesh

I need to know the position of each vertex (and triangles) from a mesh (a pointer to ID3DXMesh, created by calling functions like D3DXCreateBox, D3DXCreateTeapot and D3DXCreateSphere) to perform some ...
-2
votes
1answer
171 views

Can I use my directx 9 code to visual studio 2013 that already has directx11? [closed]

I am facing problem with my directtx 9 code?
2
votes
1answer
217 views

rendering an image within c# & sharpdx dirext3d9 [game overlay]

I'm following this guide and the related blog post to implement a basic game overlay for DirectX 9 games using SharpDX. So the tutorial already have an example for text rendering but I need to be ...
1
vote
0answers
65 views

Blending Lightmaps and Dynamic Texture Shadows in HLSL

I'm using Gile[s] as my lightmapper and my engine can execute HLSL scripts with DirectX 9. I would like to accomplish something like this for performance reasons. I was told that this technique can ...
0
votes
0answers
126 views

Directx9 engine Z-buffer problem with d3dimage

I am trying to integrate my Direct9 engine into my new WPF application via D3DImage. Everything is working except for the Z buffer. With the AutoDepthStencil at FALSE I can render my meshes but the ...
3
votes
1answer
149 views

Why is my DX9 render target restricted to 512×512?

When I use a render target higher in resolution than 512×512, I receive an image with black borders, depending on how big this texture was. Why is this? How can I fix it? Here's how I create the ...
0
votes
0answers
80 views

Picture got distorted after has been moved to Directx11

I have moved app from Directx9 into Directx11. After this upgrade strange thing happened with my world. Objects get skewed and became 2D, also they are clipped in unexpected places. Two arrows at ...
-1
votes
1answer
57 views

Simulating aircraft movement with DirectX 9 [closed]

How would I go about simulating a planes movement in DirectX 9 using transforms (i.e. matrices). For example flying around an open space. When it moves it faces the direction it is going and ...
1
vote
0answers
189 views

Screen Space Decals Normal Mapping [closed]

I'm trying to implement screen space decals with normal mapping support. Up to this point I'm able to project decals into my scene. I'm even able to sample from the normal map in decal space. I ...
0
votes
1answer
54 views

How to apply two pixel shaders in one go

Is there any possible way to apply two pixel shader simultaneously in directx-9. For example I am having two pixel shaders one to apply ripple effect and another to modify the color of the texture ...
1
vote
2answers
127 views

Dynamic Flow Control in HLSL with Array References

I'm trying to do lighting calculations for an array of point lights in HLSL. I simply want to pass light direction vectors from the vertex shader to the pixel shader. Here is sample code: static ...
0
votes
2answers
622 views

How do I sample a Depth/Stencil Texture in HLSL?

I am shadow mapping in Direct3D 9. I'm trying to avoid rendering depth to a 32-bit render target. So, I've created a depth/stencil texture( a texture w/usage Depth/Stencil ). When I render I do this: ...
0
votes
0answers
223 views

Assimp - Error loading .obj files

I'm trying to load .obj files in my little game. I decided to use assimp as tool to import those models. But it seems that assimp does not import them correctly. I looked for a simple cube mesh ...
0
votes
0answers
55 views

Using normal maps in irrlicht lime with Direct3D9

I am using Irrlicht Lime, a .NET wrapper for the Irrlicht Engine. In my scene I render some simple geometries, that I construct "by hand". These are textured and shoud get a better look through normal ...
0
votes
1answer
96 views

Simple shader for sprite interface [closed]

I have been looking for any examples for a long time, I cant get anything to work (from the examples). I have tried using vertex/pixel shaders, effects files, but they never have any effect on the ...
3
votes
1answer
259 views

How do I render from one render target to another?

I have two render targets: a fake backbuffer; a special render target where I do all my rendering. a light render target; where I render my light fx. I'm sure I'm rendering correctly on both. The ...
1
vote
1answer
190 views

How do I take Direct3D9 full screen using SlimDX?

I'm writing a Direct3D9 application wrapped by SlimDX. I'm trying to take my application full screen but I am having problems. I can reset the device so that it covers the entire screen, however, it ...
0
votes
2answers
125 views

What is DirectX 11's equivalent of D3DCAPS9::MaxVertexIndex of DirectX 9?

I'm porting a DirectX 9 program to DirectX 11. How do I get the value in DirectX 11 that is retrieved using D3DCAPS9::MaxVertexIndex in DirectX 9? Thanks in advance.
0
votes
0answers
85 views

DX9 system crash on Intel Atom CPU Z530 with Intel GMA 500

our project has to run on a very specific hardware, which is listed below: WinXP Professional 32bit Intel Atom CPU Z530 with Intel GMA 500 (2 CPUs, 1.6Ghz, 512 MB RAM) DX 9.0c 800 MB swap memory ...
0
votes
2answers
174 views

Implications of using a single ID3DXSprite object to render multiple images

I wanted to know if using a single Sprite object to render all 2D textures on screen is better than using one sprite for each 2D texture in performance. EDIT: Using single sprite refers to using a ...
2
votes
2answers
98 views

Dealing with back to front drawing with alpha blending and z buffer for a list of 2d quads

I'm using depth buffer as a layering system for my 2d render and I have to draw them from back to front to make semi-transparent quads work out. The problem is I have to sort my quads vector based on ...
0
votes
0answers
67 views

Transform texture coordinates when using shader

Assuming I define four vertices of a quad with texture coordinates that cover a whole texture or region of a texture, I can animate these coordinates by setting a transform using SetTransform( ...
0
votes
1answer
181 views

How do I avoid an infinite loop when testing D3D9 occlusion queries in SlimDX?

I'm creating a Managed DirectX 9 application using SlimDX. I'm trying to utilize occlusion queries in order to cull non-visible geometry found in the scene. The problem I'm having relates to SlimDX's ...
1
vote
0answers
151 views

AddFontMemResourceEx and D3DXCreateFont corruption

I'm trying to load a font from a buffer using AddFontMemResourceEx and then creating a D3D font with D3DXCreateFont. This works fine on every platform except Windows XP, where it causes the wrong ...
0
votes
1answer
56 views

DirectX9 texture flashing or disappearing

I am learning DirectX 9 and I have these test models in my scene and this weird texture flashing happens. If you look at the bottom of the picture you will see a blue area, that is supposed to be ...
0
votes
2answers
485 views

Directx9, FBX sdk and indices problem

So I've set up my program, know how to get everything going except for one thing: indices. I've been stumped as to how I retrieve that set of data. Does anyone know what I function I need to get them? ...
0
votes
1answer
181 views

Why do I have to switch T(v) texture coordinates while importing OpenGL to Direct3D?

I am importing my code from OpenGL to Direct3D. My D3DTS_PROJECTION uses D3DXMatrixPerspectiveFovRH, and my D3DTS_VIEW uses D3DXMatrixLookAtRH to set a view equal to OpenGL's view. My question is why ...
0
votes
1answer
132 views

SlimDX and Parsing .X Files

I'm trying to parse a .x file using SlimDX. I can create the XFile object and register templates but I'm having problems with the enumeration object. The enumeration object has a child count of 0 for ...
1
vote
1answer
89 views

Do I need to call Release() on D3D objects when I use them in another function?

For example, I have an IDirect3DSurface9 * Surface and IDirect3DSurface9 *BackBuffer. If I were to use them directly in the render_frame function, I would need to release them on the closeD3D ...
2
votes
0answers
141 views

How can I load an image into the back buffer? [closed]

How can I load and display an Image?... I have tried something but it didnt.. worked.. this is what I've tried.. File : StrikeOps_main.cpp .. void : render_frame : Intro::DisplayIntro(d3ddev, ...
0
votes
1answer
206 views

How do I handle window resizing in SlimDX?

I'm considering the use of SlimDX in a managed Windows Forms Application. Available with DirectX is DXUT. I use DXUT to handle events such as window resizing and 'lost devices.' How well does SlimDX ...
1
vote
0answers
87 views

Why am I getting the wrong color with alpha blend enabled? [closed]

I can't understand the result about drawing a line. I've set source and destination blending to D3DBLEND_SRCCOLOR, but I get a black starting color from my source. What's wrong? ...
0
votes
2answers
191 views

How to draw multiple shapes in one draw call?

I have a misunderstanding about vertex buffers in DirectX. I'm trying to draw infinite vertices that they may represent a line or a circle or a rectangle in a single draw call. I can bind them all ...
4
votes
1answer
405 views

Radiosity: Integrating Hemicubes

I'm working on a radiosity processor in DirectX 9. I have efficiently rendered hemicubes from the perspective of texels within a lightmap. Now, as I try to integrate the hemicubes (to sum the incident ...
0
votes
1answer
576 views

Converting Projected Vertex Positions to Normalized Device Coordinates

I'm using directx 9 and vertex shaders to rasterize triangles...I have vertex shader input structs like this: struct VS_INPUT_Quad { float4 Position : POSITION; float2 UV : TEXCOORD0; }; and ...
1
vote
1answer
118 views

SetFloat() in HLSL shader (effect) has no effect - variables stay at 0

I have a problem wherein I'm trying to set two simple float variables in my shader. I have a dozen other shaders in this project where it works fine, but for some reason, I've got a bug in this one ...
4
votes
2answers
628 views

Is Batching Geometry Every Frame Always Slower Than Individual Draw Calls

I'm currently have an application that has ~10k draw calls. I implemented a batching scheme where I group all objects that share material, vertex format, etc and pre-transform them by their world ...
1
vote
1answer
77 views

WDDM Managing Memory in D3DPOOL_DEFAULT

In this question I saw that I was running out of memory in D3DPOOL_DEFAULT in DX9EX. After changing my usage from D3DUSAGE_DYNAMIC to 0 (static usage), everything runs wonderfully with no DX9 error. ...
2
votes
2answers
713 views

Implementing Geometry Instancing in DirectX

I have a project that I'm doing in Managed DirectX (DX9) where I want to render lots of grass. My current method (many draw calls) is slow, but I've heard Geometry Instancing can fix that. I know ...