Skip to main content

Questions tagged [directx9]

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.

Filter by
Sorted by
Tagged with
5 votes
1 answer
1k views

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 ...
P. Avery's user avatar
  • 575
0 votes
1 answer
2k views

I'm using directx 9 and vertex shaders to rasterize triangles...I have vertex shader input structs like this: ...
P. Avery's user avatar
  • 575
1 vote
1 answer
417 views

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 ...
Dave's user avatar
  • 193
5 votes
2 answers
4k views

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 ...
default's user avatar
  • 757
1 vote
1 answer
217 views

In this question I saw that I was running out of memory in D3DPOOL_DEFAULT in DX9EX. After changing my usage from ...
Jonathan Mee's user avatar
3 votes
2 answers
3k views

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 ...
davidweitzenfeld's user avatar
2 votes
1 answer
1k views

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 ...
Jonathan Mee's user avatar
1 vote
1 answer
251 views

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 ...
Jonathan Mee's user avatar
0 votes
1 answer
215 views

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 ...
P. Avery's user avatar
  • 575
1 vote
1 answer
195 views

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 ...
Jonathan Mee's user avatar
5 votes
2 answers
2k views

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 ...
Jonathan Mee's user avatar
6 votes
2 answers
3k views

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 ...
default's user avatar
  • 757
2 votes
1 answer
3k views

I was previously uploading textures to DirectX by creating texture in D3DPOOL_MANAGED and then calling LockRect to upload the ...
default's user avatar
  • 757
3 votes
1 answer
1k views

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 overestimates triangle coverage. I need perfect emulation of ...
P. Avery's user avatar
  • 575
2 votes
1 answer
4k views

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 ...
Nathan's user avatar
  • 61
1 vote
0 answers
365 views

I'm working on a radiosity processor. I'm projecting scene geometry onto a hemisphere at a high order of tessellation during a visibility pass onto a 1024x1024 render target. The problem is that the ...
P. Avery's user avatar
  • 575
2 votes
2 answers
242 views

I'm using directx9 and have 4 textures I want to draw on top of each other. if I do this: PDevice->SetRenderState(D3DRS_SRCBLEND,D3DBLEND_SRCALPHA); PDevice->SetRenderState(D3DRS_DESTBLEND,...
cliffski's user avatar
  • 123
6 votes
1 answer
3k views

I'm trying to understand the mapping of texels to pixels, especially in the context of pixel shaders. I already found out the following: When I define a standard quad with vertices at integer ...
ph4nt0m's user avatar
  • 207
0 votes
1 answer
795 views

I have written two small test games using DirectX 9. One uses presentParams.Windowed = false; presentParams.PresentationInterval = D3DPRESENT_INTERVAL_ONE; and ...
0 votes
1 answer
157 views

I'm trying to read and ultimately write a mesh from/to file. This mesh has 2 sets of texture coordinates. The second set I know are held within the FVFData{} block of the .x file. The second set of ...
P. Avery's user avatar
  • 575
2 votes
2 answers
2k views

I'm generating light maps for scene mesh objects using DirectX's UV Atlas Tool( D3DXUVAtlasCreate() ). I've succeeded in generating an atlas, however, when I try to render the mesh object using the ...
P. Avery's user avatar
  • 575
1 vote
1 answer
2k views

I'm trying to build lightmaps for an engine I'm working on. I'm using DirectX 9 w/c++ but my questions are related to the methodology behing the generation of light maps. I have a scene built from ...
P. Avery's user avatar
  • 575
1 vote
1 answer
581 views

Let's assume I want to draw several separated (possibly textured) quads in Direct3D 9, each consisting of two triangles: How should I draw these for maximum performance, i.e. which of the following ...
ph4nt0m's user avatar
  • 207
4 votes
1 answer
3k views

In my d3d9 engine i want to take benifit of compute shader of d3d11. So firstly I created a vertex buffer in d3d11 with D3D11_BIND_UNORDERED_ACCESS and then tried to create the d3d9 vertex buffer ...
YAHOOOOO's user avatar
  • 143
1 vote
1 answer
610 views

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 <...
ph4nt0m's user avatar
  • 207
1 vote
1 answer
655 views

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 reference:...
NoobScratcher's user avatar
3 votes
3 answers
9k views

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 ...
jhyap's user avatar
  • 141
2 votes
2 answers
4k views

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 ...
user's user avatar
  • 61
0 votes
2 answers
7k views

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 ...
optimisez's user avatar
1 vote
0 answers
695 views

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 ...
puelo's user avatar
  • 145
-3 votes
1 answer
174 views

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 ...
optimisez's user avatar
1 vote
1 answer
5k views

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 ...
MahanGM's user avatar
  • 377
1 vote
2 answers
2k views

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 ...
optimisez's user avatar
1 vote
1 answer
885 views

...
Levi H's user avatar
  • 611
2 votes
2 answers
1k views

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 ...
Michael Marcin's user avatar
1 vote
1 answer
257 views

my problem is : If I load 2 models ( the same model zombie ) and give them the same effect I got the following error : ...
Mohammad Ahmed's user avatar
1 vote
1 answer
503 views

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 ...
Richard Copperwaite's user avatar
1 vote
1 answer
504 views

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, ...
Lennard Fonteijn's user avatar
1 vote
1 answer
2k views

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 ...
tobsen's user avatar
  • 155
3 votes
2 answers
1k views

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 ...
Jimmyt1988's user avatar
-1 votes
1 answer
808 views

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 ...
User's user avatar
  • 143
1 vote
1 answer
437 views

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 ...
kochol's user avatar
  • 182
1 vote
0 answers
186 views

I'm trying to make resolution change in my game based on Playground SDK. Now it looks so: ...
ElDorado's user avatar
  • 111
5 votes
3 answers
3k views

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 ...
Ole Dittmann's user avatar
1 vote
2 answers
2k views

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 ...
Ganpat's user avatar
  • 119
0 votes
1 answer
740 views

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 ...
Tristan Gibson's user avatar
-2 votes
1 answer
386 views

How to calculate direction for D3DXIntersectTri function to find intersected point? And after getting the result in Distance how to get that coordinate(XYZ)?
Ganpat's user avatar
  • 119
0 votes
2 answers
1k views

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 ...
balauru's user avatar
0 votes
2 answers
482 views

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 ...
default's user avatar
  • 757
-1 votes
1 answer
1k views

I'm new to Directx and i want to render Cylinder using "D3DXCreateCylinder" function. I using Delphi Xe2 and JEDI for DirectX9.
Ganpat's user avatar
  • 119