DirectX is a set of multimedia APIs from Microsoft aimed primarily at game developers. Popular APIs within the DirectX collection include Direct3D, XInput, and XAudio.

learn more… | top users | synonyms (1)

6
votes
2answers
1k views

How to get the maximum installed version of DirectX?

Okay, So I would like my engine to detect weather or not it can use DirectX 10, if it can't it defaults to DirectX 9.0c but, the function DirectXSetupGetVersion() will only return Versions 5 through ...
4
votes
1answer
2k views

How do I create a CPU read/write buffer in SlimDX (what are the legal combinations of Usage and CPUAccess flags)?

Currently, I create a vertex buffer in SlimDX like so: SlimDX.Direct3D11.BufferDescription Description = new SlimDX.Direct3D11.BufferDescription(); Description.BindFlags = ...
0
votes
1answer
406 views

DirectXCollision.h missing

I am using DirectX10, June release and I am trying to #include <DirectXCollision.h> so that I can use the bounding objects, however it does not seem to be there. Am I missing something ...
4
votes
2answers
3k views

How does one write to another process's OpenGL/DirectX context?

I want to write a short of chat client that display the messages in-game (OpenGL/DirectX), but I really don't know how to handle this. It is easy to write my client in my graphic context... but what ...
1
vote
1answer
143 views

How to prevent a certain textured quad from the effect of the pixel Shader at the run time in slimdxdirect3d9 or directx9?

I am having a video and and image slide show being rendered simultaneously. Both video and the image is being rendered by the help of texture and two different quads. Video is being rendered on the ...
0
votes
1answer
2k views

How to resize an image texture according to the size of a sprite in directx9 or slimdxDirect3d9?

I want to know that is there any way of resizing our texture to the size of a sprite in slimdx direct3d9 or directx9. That is if my image size is 1024x768 and sprite size is 500x500, how can i resize ...
3
votes
2answers
2k views

What is the “DirectX for Managed Code Update”?

I came upon this site while looking for information about working with DX in managed code and saw that MS released something containing a 'DirectX for Managed Code Update'. This sounds promising but ...
-2
votes
2answers
484 views

ID3D10Device pointer problem

sorry in advance for the large chunk of code. Basically when placed in the same file this works fine, but if placed in separate files (and I have tested this) just after Init() is called, the pointer ...
5
votes
2answers
253 views

What use does the unary & operator have in this piece of C++ code?

In an example for a little game framework (that does work), there are the lines: ID3D10Device* device; ID3D10Buffer* pBuffer; followed by the line device()->CreateBuffer(&bd, NULL, ...
1
vote
0answers
2k views

Directshow VMR9 Allocator presenter present image problem [closed]

I am working with DirectShow for video playback and trying to get the video displayed on a D3D9 texture via SlimDX. I am using IVMRSurfaceAllocator9, IVMRImagePresenter9 for getting a surface from the ...
21
votes
3answers
8k views

For voxel rendering, what is more efficient: pre-made VBO or a geometry shader?

Given a fairly static voxel array, what is more efficient: using the CPU to pre-generate a VBO to render the voxel faces (ignoring more advanced forms of rendering like marching cubes for now) or ...
1
vote
1answer
798 views

Zoom to mouse cursor DirectX

I have a DirectX scene. I want zoom in using mouse wheel to the mouse location. I am able to zoom the view to center of screen but I need to zoom to mouse location. Please suggest how it can be done. ...
0
votes
1answer
214 views

How fill gutter using ID3DXTextureGutterHelper interface?

Using UVAtlas (Direct3D 9) Packed charts are separated by a user-specified gutter width. The gutter width is the amount of separation between charts, and allows for bilinear interpolation and ...
0
votes
1answer
1k views

How to not-unroll loops in Shader Model 3 HLSL

I'm working on raycaster in HLSL, unfortunately it have to be in DX9. But it cannot be compiled I did similar raycaster in DX11 and i know that there is always problem with FXC compiler that it tries ...
37
votes
1answer
1k views

How do I create particles that react to the player and enemies?

I'm currently making a game with my own game engine which I've written in C++ and I'm using the most recent directx SDK. The game is a top down space shooter (with a pretty interesting twist) and ...
2
votes
1answer
1k views

Direct3D11 feature level

If I set the directx feature level to D3D_FEATURE_LEVEL_9_3 but I have a graphics card which supports D3D_FEATURE_LEVEL_11_0 does that prevent directx11 features from working even though my graphics ...
2
votes
0answers
631 views

Problem of tearing in Slimdx and DirectShow video [closed]

I have written a video player using SlimDX and DirectShow which is displaying the video on a SlimDX texture. I am extracting the video frames using the ISampleGrabberCB interface from DirectShow and ...
6
votes
3answers
2k views

Direct3D and OpenGL Matrix representation

As I read in OpenGL matrices are column major. It means that if I create a 16 element array first four elements are the first column in matrix. Is it the same for Direct3D or any transformation's ...
2
votes
1answer
351 views

What is an OpenGL equivalent to ID3DXSprite?

As a Direct3D developer I can use the ID3DXSprite class (in D3DX library) for drawing 2D graphics. What's the best way to implement this functionality in OpenGL?
0
votes
1answer
176 views

Under what circumstances will a PIX 'Render' be different to the actual 'render'?

I am trying to implement dual-pass alpha sorting using Ogre material scripts, as part of my debugging attempts I want to compare two PIX captures, but when I attempt to debug a pixel in PIX, ...
3
votes
2answers
3k views

How can I draw multiple lines connected via “nodes” with SlimDX?

I currently read out XML data with the following scheme: Position x,y,z I try to add one new Vertex for each position node and add it to a Vertex array. Then I try to render this list of vertices so ...
4
votes
2answers
6k views

Mapping a Vertex Buffer in DirectX11

I have a VertexBuffer that I am remapping on a per frame base for a bunch of quads that are constantly updated, sharing the same material\index buffer but have different width/heights. However, ...
1
vote
3answers
626 views

What should I use to handle input? [closed]

What should I use to handle input? I am wanting to use OpenGL so that my games are cross platform. DirectX provides input libraries, and OpenGL does not. Because my games need to be cross platform, I ...
-2
votes
1answer
324 views

Stop rendering to lessen amount of resources used?

Also posted on StackOverflow, hope this isn't a problem. Recently I've been writing a bot for a game which uses a DirectX backend for its rendering. I have managed to 'hack' the game into allowing ...
3
votes
2answers
977 views

implementing multi pass rendering in a game engine

I have done multi pass rendering before and understand how it works. I did a simple example which rendered a basic scene with shadows. This was all done in one file. Now I am trying to figure out is ...
5
votes
1answer
2k views

Render to Texture2DArray slices in DirectX11?

I would like to set a slice of a Texture2DArray as a render target in D3D/DirectX11. It's not clear how to do this. What I'm looking for is the DirectX equivalent of glFramebufferTextureLayer(), ...
1
vote
0answers
749 views

Loading a sub resource for a texture array [closed]

I've been trying to load textures into a texture array, but I've hit a wall with my knowledge of subresources. Any time I try loading the data, I just get junk as output. The code below is only set ...
0
votes
2answers
876 views

Graphics capabilities differences between mobile and desktop/console platforms?

I would like to better understand the difference in capabilities between mobile and desktop/console graphics? What exactly are the limitations of a mobile device? What kind of operations can a ...
2
votes
1answer
694 views

How can I convert .X files from text to binary form?

Is there a tool for Linux (preferably a command-line tool) that can convert from the .x text format to the binary format? I wish to use this format with Irrlicht but the text format is loading very ...
4
votes
2answers
715 views

Material vs Material Pass

I am trying to figure out the difference between a "Material" and a "Material Pass" (in theory). Is it basically that a Material will have multiple "Material Pass"'es, along with a name. Then the ...
1
vote
0answers
292 views

GetRasterStatus usage in direct3d [closed]

I am interested if anyone has had used GetrasterStatus in direct3d application to control application vsync behaviour in high precision timing? What set of techniques are to be implemented to do the ...
3
votes
3answers
3k views

Non blocking Vsync in direct3d

I have direct3d application with a direct3d PRESENTATION_INTERVAL_ONE implementation. Pitty, its blocking and eating my CPU waiting for a Present. I ended up searching for Raster scan solutions, ...
2
votes
1answer
6k views

Loading a Texture2D Array in DirectX11

How does one create a Texture2D Array in DirectX11? The texture I am trying to create is not multisampled, and I want only one mip level. I can't find a working example of a Texture2D Array. I have a ...
4
votes
2answers
992 views

Real time reflections

I just had a quick look at the new Crysis 2 DX11 update, and was quite surprised by some of the new features, especially the real time reflections on moving models. From what I could gather, there are ...
7
votes
3answers
4k views

Draw contour around object in Opengl

I need to draw contour around 2d objects in 3d space. I tried drawing lines around object(+points to fill the gap), but due to line width, some part of it(~50%) was covering object. I tried to use ...
1
vote
2answers
187 views

Hidden operations of the Direct3D pipeline

I'm curious- what operations are there in Direct3D that aren't controlled directly through shader, or directly to do with shader manipulation- i.e., that occur behind the scenes. So far, I've got ...
0
votes
1answer
152 views

Outputting wrong colours from pixel shader in Direct3D

The output from the pixel shader in Direct3D is four floats, normalized 0-1 for each channel (RGBA). But what happens if these floats haven't been normalized correctly and are above 1?
3
votes
2answers
545 views

loading 3d model data into buffers

I am using assimp to load 3d model data. I have noticed that each loaded model is made up of different meshes. I was wondering should each mesh have it's own vertex/index buffer or should there just ...
2
votes
1answer
166 views

DirectX the same across platforms?

Various versions of DirectX are available on both Windows and Xbox. Are the libraries the same on both platforms? Obviosly I'm talking about the interfaces — such as the ones for working with ...
4
votes
3answers
2k views

Loading and using an HLSL shader?

I've been looking everywhere and all I can find are tutorials on writing the shaders. None of them showed me how to incorporate them into my scene. So essentially: Given an hlsl shader, if I were to ...
6
votes
3answers
4k views

Tool for editing .X

This is probably the zillionth place where I try to get help in this, so please do bear with me, if I missed something with the local search engine - just need a short answer: a short suggestion. I am ...
1
vote
2answers
284 views

Different types of memories which a graphics card has

I've been googling this around and yet nothing showed up but some articles from middle ages which were talking about Gforce mx and ... . My question is just this: what are the different memories in a ...
3
votes
2answers
1k views

Proper asset management?

I am unable to wrap my mind around designing a good way to manage resources in my game. For instance, a vertex buffer in DirectX or OpenGL would lead me to believe I should have one central buffer in ...
-1
votes
2answers
535 views

How to do gradient transitions using slimdx?

I am making an image slide show using slimdx and c#. Till now I have done transitions using the matrix transformation but now I am trying to make transitions using some gray scale background image. ...
3
votes
1answer
1k views

WM_PAINT and Direct3D

I've seen people who've written in code where the graphics of a scene are rendered in response to WM_PAINT. I only ever rendered the scene once all Windows messages were done translating, and then ...
3
votes
2answers
410 views

Render only some of graphics?

In XNA I am building my own textbox, and listbox. For the textbox, I want it to render all text it can, and then cut off at the end of the textbox. But I don't want it to cut whole letters. I want it ...
7
votes
5answers
4k views

Best pathfinding algorithm for a tower-defense game? [duplicate]

What do you suggest would be the best algorithm for a tower-defense game? It's a 2D based tile game, where there is walls and towers blocking the way, between spawnpoints and their destination points. ...
1
vote
1answer
302 views

How do I display same “proportional” text size on different resolutions?

I draw some text on screen using ID3DXFont::DrawText. This text should be displayed the same regardless of screen resolution. For example, if screen resolution is low, text wrapped and when it is ...
1
vote
1answer
1k views

downsampling algorithm

what are the steps to perform downsampling on a texture ? I've got as far as rendering the scene to a render target, but I'm not sure as to how to then render that to a smaller texture in order to ...
8
votes
4answers
2k views

In a 2d tile based game, what is a good method for scrolling?

I am using Direct3D with the D3DXSPRITE wrapper to draw the tiles to the screen. I have a tile class which contains members such as collision and tile type, then i have an array of tiles e.g. Tile ...