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
votes
0answers
23 views

Of Skinning Animation with HLSL BoneIndex Data transfer error [closed]

I work for a job that is nowadays through the HLSL shader rendering skinning animation . But one kinds of error occurred . My shader code looks like this: VS_OUTPUT VS_Main( float3 PosL ...
0
votes
1answer
22 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 ...
0
votes
0answers
18 views

How to convert ticks to clock cycles when profiling API calls [migrated]

I am profiling Direct3D9 API calls. I have read a lot of documentation here that describes the process. I have a question though about calculating the elapsed clock cycles. Here is my current method: ...
0
votes
0answers
17 views

DirectX 9 - Troubles on PRT

Does anyone tried to use PRT? I'm asking this because i didn't find out anything in the internet that may help me solve my problem without asking here for help. So my question is - why the code below ...
1
vote
0answers
40 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
69 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 ...
0
votes
1answer
46 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
90 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
74 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
53 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
76 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
125 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
52 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
110 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
129 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
77 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
55 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
149 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
52 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
94 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
438 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
191 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
51 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
88 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
247 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
164 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
112 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
79 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
138 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
96 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
58 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
161 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
139 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
51 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
405 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
161 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
120 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
79 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
126 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
174 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
77 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
174 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
370 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
492 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
107 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
562 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
63 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
591 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 ...
2
votes
1answer
304 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
81 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 ...