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
206 views

How to set a global alpha-blending value in Direct3D 9?

Is it possible to set an alpha value globally in Direct3D 9, which modulates the pixel alpha values of every subsequent draw? I would like to let a whole scene fade in/out. I know that for example ...
1
vote
1answer
157 views

Whats the point of this LPDIRECT3DDEVICE9 reference?

I'm going through the DirectX 9 MSDN documentation Which lead me to something rather peculiar, do you need a class reference in DirectX 9? Can someone tell me what the point of the class ...
3
votes
3answers
2k views

How to implement marching cube algorithm for rendering clouds

I would like to render clouds using C#, directX9.0 using Microsoft.DirectX.Direct3D; using Microsoft.DirectX; Now I have roughly add and render the vertex as per below: As you can see, the ...
1
vote
2answers
580 views

how to set image resource path for D3DXCreateTextureFromFileEx method?

I try to merge all the image resources to a folder called resource. So, set image path as "resource/" but my directX framework only works if I compile at VS 2010. If I run from the debug folder it ...
0
votes
2answers
1k views

FPS limit function

I try to cap the animation at 30 fps. So I design the functions below to achieve the goal. Unfortunately, the animation doesn't behave as fast as no condition checking for setFPSLimit() function when ...
1
vote
0answers
256 views

2D Camera transformation sidescroller

i am currently trying to dive into 2D programming with DirectX, especially bulding a tile based sidescroller. I have worked with some chapters from a book (Advanced 2D Game Development) but always ...
-3
votes
1answer
117 views

Undefined fireball movement behavior

Demonstration video I try to do after the player shoot 10 times of fireball, then delete all the fireball objects and recreate a 10 new set of fireball objects. I did it but there is a weird bug ...
1
vote
1answer
1k views

How to set orthgraphic matrix for a 2d camera with zooming?

I'm using ID3DXSprite to draw my sprites and haven't set any kind of camera projection matrix. How to setup an orthographic projection matrix for camera in DirectX which it would be able to support ...
1
vote
2answers
577 views

How to blend the sprite into background?

I try to blend the character into game but I still cannot remove the blue color in the sprite sheet and discover that the white area of sprite is semi-transparent. Before that, the color ...
1
vote
1answer
235 views

How can I compile SM 3.0 effects in D3D11 in SlimDX?

var bytecode = ShaderBytecode.CompileFromFile("shaders\\testShader.fx", "fx_5_0", ShaderFlags.None, SlimDX.D3DCompiler.EffectFlags.None, null, null, out str); var effect = new ...
2
votes
2answers
239 views

Direct3D9 depth write without depth test

In OpenGL and Direct3D11 depth write is disabled if depth test is disabled. To enable depth write with out depth test in gl you must enable depth test with depth func always. OpenGL Even if the ...
1
vote
1answer
211 views

Sharing the effect [closed]

my problem is : If I load 2 models ( the same model zombie ) and give them the same effect I got the following error : for(int i =0 ; i<2 ; i++) { dwarfModel[i].model ...
1
vote
1answer
186 views

Texture Shaders vs. Pixel/Fragment Shaders?

My question is a simple one. Functionally, practically, and performance-wise, what are the differences between using a D3DX Texture Shader, and using a Pixel/Fragment Shader rendered with a full ...
0
votes
1answer
119 views

Are there alternatives to Vertex Tweening?

Now that I'm getting into animating 3D entities in my game, I was wondering what the best approach for this would be. I did some research and came across something called "Vertex Tweening". However, ...
1
vote
1answer
401 views

Flip the whole Directx output horizontally (mirror the output)

I would like to flip the whole fullscreen directX output horizontally so that the final output is presented mirror inverted. Is there a way to create a IDirect3DDevice9 instance which produces ...
3
votes
2answers
457 views

Clipping a windows draw area - Direct x 9 and c++ - 2D using D3D

DirectX 9, C++... Let me set the scene: I have a 16:9 image. I have a 16:10 screen. I want the 16:9 image to be drawn so that it is vertically centred within my 16:10 screen. My 16:9 image is 1920 x ...
-1
votes
1answer
408 views

Changing map 0,0 origin to top left while using D3DXMatrixOrthoLH

Thanks to Tetrad (for pointing out D3DXMatrixOrthoLH ) I have figured out how to set it up in DirectX9. However, the problem I am now facing is my 0,0 mouse position is now in the middle. What I ...
1
vote
1answer
91 views

Select display adapter in D3D9

I have a notebook that has 2 graphics card one Intel and one nvidia graphics cards. When I want to start my game I right click on the exe file and select run with graphics processor->Nvidia but my ...
1
vote
0answers
91 views

changing resolution in game on Playground SDK

I'm trying to make resolution change in my game based on Playground SDK. Now it looks so: TPlatform::GetInstance()->SetDisplay(width, height, fullScreen, letterbox); ...
5
votes
3answers
619 views

DirectX9 thread lock problem with “present” and background loading new textures

Given: Selfmade 3D engine based on DirectX9 written in C++ Task: While render loop runs load additional textures in a background thread Current Implementation: - Create device with ...
1
vote
2answers
390 views

DirectX How to Gernerate Vertices for Diamond Shape and Render it?

How to generate vertices for 3D Diamond Shape in DirectX? EDIT: I am creating an application which receive DIAMETER, CROWN, GIRDLE and PAVILION as parameter and render a model of diamond according to ...
0
votes
1answer
166 views

How do I make multiple instances of an object?

In a game I am working on, I am having an issue with making the player's ship shoot multiple bullets. The bullets have individual X and Y coordinates and velocity for X and Y. When I press "SPACE" to ...
-2
votes
1answer
133 views

How to use D3DXIntersectTri function to find intersected point?

How to calculate direction for D3DXIntersectTri function to find intersected point? And after getting the result in Distance how to get that coordinate(XYZ)?
0
votes
2answers
395 views

Problem reseting device when using render target

How can I reset the device when I am rendering to a surface, and then stretching that surface to the back buffer. If i don't change the render target everything goes well, but when i change the render ...
1
vote
0answers
350 views

tex2dlod and tex2d giving different values [closed]

I've been having trouble with vertex texture fetch for a terrain system I am implementing. I'm using C++/DirectX9. I have already implemented exactly what I want as a prototype in C#/XNA and now ...
0
votes
2answers
259 views

D3DXCreateEffect Performance

Current performance analysis shows that D3DXCreateEffect is called many times with different shaders. Between each call, the D3DCompile DLL is being loaded and unloaded. Is there an easy way to keep ...
-1
votes
1answer
338 views

How to Render Cylinder with built in function D3DXCreateCylinder in Directx9 with Delphi-Xe2 and JEDI? [closed]

I'm new to Directx and i want to render Cylinder using "D3DXCreateCylinder" function. I using Delphi Xe2 and JEDI for DirectX9.
0
votes
1answer
298 views

Making a DX9 game resolution independent

How can I change the resolution and stretch my entire game to the new resolution? I want my game to have a base resolution, and when I change it to stretch to that new resolution. I saw a few similar ...
0
votes
3answers
725 views

Using DirectX9 within Visual Studio 2012 in Windows 8?

Asking the question here simply because my PC is down for the count for a while and wasn't able to stave a curiosity before that happened. I picked up a few books about programming Games in DirectX, ...
0
votes
1answer
128 views

Adding Shader Model 3.0 support to my Direct3D9 app

So far, we've only used pixel shaders because we never needed to do any custom processing at the vertex shader level. However, the 3.0 model shader forces you to define a vertex shader. And that's ...
1
vote
1answer
733 views

How can I render multiple windows with DirectX 9 in C++?

I'm trying to render multiple windows, using DirectX 9 and swap chains, but even though I create 2 windows, I only see the first one that I've created. My RendererDX9 header is this: #include ...
1
vote
1answer
449 views

2D Matrix Transformation (with a Player and Ground)

I have a simple game that I'm trying to do for learning purposes, but Matrices are a bit hard, especially in DirectX. I currently have a tilesystem that renders tiles at the screen and a character ...
5
votes
1answer
1k views

2D Line drawing with Pixel Shaders

Recently I asked a question, what is the fastest way to render 2D lines using DirectX, and one of the answers mentioned this paper on Fast Prefiltered Lines which uses Pixel Shaders to accomplish ...
1
vote
1answer
1k views

DX11 application running on Windows XP using only DX9?

I'm developing an application that utilizes DX11. I know that DX11 is only available on Windows 7 (and Vista with SP). I wonder if there is some way to run the application on Windows XP and use only ...
1
vote
2answers
134 views

In the Direct3D 9 Effect API, how do you find the texture variable linked to a sampler?

In Direct3D 9 effect files you can write a sampler state that specifies a texture variable to use, like Texture2D g_texSkyDome; SamplerState g_samplerSkyDome { Texture = <g_texSkyDome>; ...
3
votes
3answers
1k views

DirectX 9 - model rendering from .obj files issues

Well I can clearly tell that what rendered is close to what I wanted, but there seems to be a few problems. The .obj files contained values like "f", "v", "vt". Image Of Problem: ...
7
votes
3answers
772 views

Isometric smooth fog

I'm working on a simple 2d game with direct3d 9. It's a isometric game with diamond tiles and a staggered map. This is what I have: As you see I have some kind of fog which is acomplished by having ...
0
votes
2answers
386 views

How can I capture every frame in DirectX 9 using a shader

This is actually a follow up to this question How to capture the screen in DirectX 9 to a raw bitmap in memory without using D3DXSaveSurfaceToFile The proponent of the best solution suggested that I ...
1
vote
1answer
167 views

Direct3d - Code structure

I'm learning directx in a master's degree and they taught us to have a GraphicsLayer class which is the one connecting with the direct3d library. That way this class is completly independent from the ...
1
vote
0answers
274 views

DX9 Deferred Rendering, GBuffer displays as clear color only

I'm trying to implement Catalin Zima's Deferred Renderer in a very lightweight c++ DirectX 9 app (only renders a skydome and a model), at this moment I'm trying to render the gbuffer, but I'm having a ...
1
vote
1answer
182 views

Inter Quake Model IQM render Directx9

I'm trying to render an Inter Quake Model(http://lee.fov120.com/iqm/) in DirectX9 that I exported from blender. I want to display animations which IQM supports and my model format does not. The ...
4
votes
3answers
4k views

How to capture the screen in DirectX 9 to a raw bitmap in memory without using D3DXSaveSurfaceToFile

I know that in OpenGL I can do something like this glReadBuffer( GL_FRONT ); glReadPixels( 0, 0, _width, _height, GL_RGB, GL_UNSIGNED_BYTE, _buffer ); And its pretty fast, I get the raw bitmap in ...
6
votes
1answer
588 views

Partial Shader Signatures HLSL D3D11 C++

I had been debugging a problem I was having in a single shader file with 2 functions in it. I'm using DirectX 11, vs_5_0 and ps_5_0. I have stripped it down to its basic components to understand what ...
1
vote
0answers
213 views

How should VertexBuffers be used with Multiple Monitors in DirectX 9

I am currently using DirectX 9 on a machine with two GPUs and three monitors. I am currently trying to draw a triangle on each monitor using vertexbuffers; A directx helloworld with multiple monitors ...
3
votes
3answers
695 views

CreateRenderTarget returns 0x80070057 in big surface resolution

I have created the SLI merged desktop of three 1920x1680 monitors, so the desktop resolution is 5760x1080. There is a 0x80070057 error, while calling CreateRenderTarget to create the RT_Surface: ...
2
votes
3answers
818 views

Rain effect using DirectX 9 capabilities

Is it possible to achieve something similar to nVidia's rain demo using only shader model 3.0 capabilities? If yes, could you point out a few documents/web resources that are suitable candidates and ...
5
votes
1answer
944 views

Rendering a Sprite with an Effect… how?

gettings tuck doing some 3d Rendering and I think you guys may have a lot more knowledge in it. I am tasked with basically rendering a texture onto a screen, preparing the way to apply graphical ...
1
vote
2answers
321 views

Reducing the level of detail of a mesh

I am importing an extremely detailed mesh (provided by a client) and it consists of something like 16 million triangles. For rendering performance I've been using the ID3DXMesh interface's Optimize ...
6
votes
1answer
461 views

What elements of D3DPRESENT_PARAMETERS MUST be set?

DIRECTX9... For ages, I've shipped games that only half-fill out the D3DPRESENT_PARAMETERS structure, and now I'm wondering if this is buggy. The items I'm worried about, and never set are: ...
0
votes
1answer
197 views

How can I keep straight alpha during rendering particles?

Rencently,I was trying to save textures of 3D particles so that I can reuse the in 2D rendering.Now I had some problem with alpha channel.Some artist told me I that my textures should have ...