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)

0
votes
0answers
16 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 ...
-2
votes
0answers
17 views

DirectX9 seems to call EventRegister(), unsupported on windows XP? [on hold]

I'm no n00b to Directx9, but suddenly it seems like running an application developed using Visual Studio 13 and directx9 will NOT run on XP. Why? Because EventRegister() is not supported. Fine... I ...
-1
votes
0answers
14 views

System.AccessViolationException when instantiating a SlimDX.Direct3D9.VertexShader from pointer

I'm trying to instantiate a SlimDX.Direct3D9.VertexShader object from a pointer. I retrieve the pointer using the PassDescription object present in the compiled effect like so: try { // create ...
3
votes
1answer
102 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
67 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
43 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
61 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
43 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
41 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
91 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
87 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
28 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
80 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
217 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
111 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
1answer
81 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
64 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
106 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
80 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
48 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
143 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
103 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
41 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
217 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
116 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
98 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
59 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
89 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
135 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
69 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
155 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
307 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
336 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 ...
0
votes
0answers
89 views

D3D9: StretchRect() between multisampled surfaces/depth buffers

The D3D9 docs only state that StretchRect() can be used to downsample a multisampled render target. It's not clear on what happens if both involved surfaces are multisampled. In particular, I wonder ...
0
votes
0answers
22 views

Writing 2 instanced models into a 2x wide RenderTarget as a form of MRT: disadvantages?

Our graphics engine uses forward pipeline. The final data is being written into a R8G8B8A8 target (no HDR) and prost-processed afterwards. Alpha channel contains the power of bloom for the current ...
1
vote
1answer
94 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
403 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
52 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
453 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 ...
0
votes
0answers
163 views

DirectX 9 Blank Screen after Window Loses Focus [closed]

I have an application that uses DirectX9. I have 2 viewports( device swapchains ) to which I render geometry. If, during runtime, I click on a different application's window and then later try to ...
2
votes
1answer
227 views

How should I prepare for migration from D3D9 to D3D10 or D3D11?

I'm considering a Direct3D9 texture streaming solution, but my company will eventually be going to D3D11 in the future. I wanted to make my solution as forward compatible as possible, so I was hoping ...
1
vote
1answer
68 views

Is there a way to limit the size of the D3DPOOL_MANAGED pool?

I have over 2GB of textures that I need to put in D3D9's D3DPOOL_MANAGED pool. D3D9 charges the system copy of anything in the D3DPOOL_MANAGED to my process space. I'm working on a 32-bit system so I ...
0
votes
1answer
78 views

Why would I lose the D3D device during an HLSL unroll?

I have a pixel shader that downsamples a texture from one size to another. The downsample shader uses a nested 'for' loop to traverse the uv coordinates. When the for loop executes more than four ...
1
vote
1answer
59 views

Can I Use SetLOD with D3D9Ex?

I need to limit the mipmap level loaded onto the device for certain textures, but I'm using a D3D9Ex-based engine, so I can only use D3DPOOL_DEFAULT, not D3DPOOL_MANAGED. Microsoft's documentation ...
0
votes
0answers
97 views

Questions about alpha blending [closed]

Consider the following code: Device->SetRenderState(D3DRS_ALPHABLENDENABLE, true); //Open alpha blending Device->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA); //Source factor ...
4
votes
2answers
275 views

Why am I running out of memory in D3DPOOL_DEFAULT?

When trying to using my company's D3D9 renderer and allocating everything in D3DPOOL_MANAGED I would run out of memory in the 32-bit process space. I tried using our D3D9Ex renderer and allocating in ...
6
votes
2answers
766 views

Fixed Function vs Programmable Pipeline performance with many batches

In OpenGL 2.0 I can easily make 10,000 draw calls per frame (with state changes in between each call). However, if i try to do this in either OpenGL ES 2.0 or DirectX9 with shaders, my peformance is ...
2
votes
1answer
449 views

How to create texture using raw RGBA texture data without having to use LockRect

I was previously uploading textures to DirectX by creating texture in D3DPOOL_MANAGED and then calling LockRect to upload the texture data to DirectX. However, I have switched to using DirectX9 Ex, ...
2
votes
1answer
242 views

How does the Direct3D 9 rasterizer determine triangle coverage?

I'm working on a software rasterizer to use in my project. I have implemented one that works well, however, often my rasterizer under or over estimates triangle coverage. I need perfect emulation of ...
2
votes
1answer
325 views

DirectX11 Swap Chain RGBA vs BGRA Format

I was wondering if anyone could elaborate any further on something that's been bugging me. In DirectX9 the main supported back buffer formats were D3DFMT_X8R8B8G8 and D3DFMT_A8R8G8B8 (Both being BGRA ...