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)

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
616 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
308 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
957 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
740 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
872 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
683 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
702 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
289 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
982 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
151 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
544 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
283 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
525 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
3k 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
297 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 ...
4
votes
2answers
3k views

How Often do you change Vertex/Index/etc Buffers?

So im still learning but I think i've got a grasp of most things DX11 (Well....beginner things) And I REALLY do apologize for all the questions.....but I'd rather understand EVERYTHING before I move ...
11
votes
4answers
1k views

How does an HLSL shader actually end up affecting the render output?

I understand the syntax of HLSL, for example let's pretend I have this as my HLSL: struct VOut { float4 position : SV_POSITION; float4 color : COLOR; }; VOut VShader(float4 position : ...
0
votes
1answer
2k views

Fullscreen + Vsync = Stuttering

In my research for a stuttering problem in my game engine, I think, I have found the problem, but don't have any idea why this is happening, that's why I ask you if you have an idea ! The situation : ...
1
vote
1answer
367 views

Output from vertex shader in D3D9

I've been looking at creating some 2D rendering systems in D3D9, basically because I don't like ID3DXSprite. For the output of the vertex shader, what co-ordinate system does the run-time expect ...
2
votes
2answers
338 views

Initializing Direct X

I've recently starting with Direct X; I've been using Rasertek's tutorials, and Frank Luna's book. One thing thats just out of this world to me is how much effort it is to initialize DX11: the swap ...
5
votes
1answer
752 views

Problem with DirectX scene-graph

I'm trying to implement a basic scene graph in DirectX using C++. I am using a left child-right sibling binary tree to do this. I'm having trouble updating each node's world transformation relative to ...
4
votes
3answers
4k views

Inverting matrix in HLSL

I've got an object in HLSL and I'm using hardware instancing to render multiple copies. But I've come a bit of a cropper when it comes to the vertex normals. Currently I am not using normal mapping ...
1
vote
1answer
412 views

Can I load OGRE's mesh file via direct3d?

I just posted this question over at the the OGRE 3D forums, and I wanted to post it here as well. I'm a newbie here, just found that OGRE is an amazing engine for 3d programming. Using the Entity ...
6
votes
2answers
366 views

Does it make sense to include an index for linelists?

Does it make sense to include an index by using DrawIndexedPrimitives, when using linelists performance wise? I could imagine it would be easy for the GPU to generate such indexes anyway.
3
votes
1answer
158 views

Instancing with empty data, or varying vertex counts?

I am new to game development, having only developed a few games before, in 2D space, but with 3D rendering. I have implemented instancing before, but this is only my 2nd time doing it. I have a ...
3
votes
1answer
216 views

Rudimentary 3D graphics in C++ .NET

I am looking to implement an extremely rudimentary FPS game with extremely rudimentary 3D graphics using C++ .NET and DirectX. I'm not interested in any third party libraries or anything special like ...
13
votes
3answers
4k views

Why do pixel shaders not let us read directly from the framebuffer or the depth buffer?

Letting me sample the framebuffer or the depthbuffer in the pixel shader would be an extremely useful feature. Even just being able to know the depth or the color of whatever is behind the current ...
1
vote
1answer
272 views

HLSL weird matrix behaviour

I have some problems using an int 3x3 matrix as the convolution filter to do edge detection. (I know int matrices are not very meaningful since there is only float on the gpu) Here is the code: ...
8
votes
4answers
500 views

What types of effects or shaders would you teach in a rendering class? [closed]

I am looking for a list of topics that would be fun to learn and not too complicated to implement with a prototyping tool like FX Composer or Rendermonkey for an intermediate class of real-time ...
8
votes
5answers
660 views

Do you think it's Possible to go from C++ Straight to 3D (skipping 2D)

Do you think it's possible to go straight from Experienced C++ programming (5 or so years) straight into learning DirectX 3d? I mean....i'd be starting with the basics, im more interested in setting ...
24
votes
4answers
2k views

game story event programming

I have developed a game engine in c/c++ and DirectX. I have a tile engine for the maps, animated player/npc sprites, talking to the npc, menus, and level changing but there is no game, it just feels ...
9
votes
3answers
4k views

Moving from DirectX 10 to DirectX 11

I've done a reasonable number of small hobby projects using DirectX 9 but it's time to move to DirectX 11 now. I have Frank Luna'a book on 3D programming using DirectX 10 but nothing on DirectX 11. I ...
0
votes
1answer
337 views

Importing python DirectX into c++ DirectX program

I'm not asking for code or anything, just some advice on what to google, because I have no idea what to call this process. I made a video player (with full controls) with python and DirectX and would ...
1
vote
1answer
294 views

Loop through a loaded .x file's vertices

I need to compute the "gravity center" of a mesh, some kind of barycenter, and then find the farest vertices to compute a bounding sphere. Here is what I have for the moment: D3DXVECTOR3 ...
3
votes
1answer
1k views

(real) 3d map rendering in wpf without an engine - how to handle the map data?

I'm just doing some research before embarking on rendering a 3D map inside a wpf app. I've never delved into 3D before, and hence the question.. I have map data (in several formats, and many files) ...
7
votes
5answers
1k views

Correct level of abstraction for a 3d rendering component?

I've seen lots of questions around this area but not this exact question so apologies if this is a duplicate. I'm making a small 3d game. Well to be honest, it's just a little hobby project and ...