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
697 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
288 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
976 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
3k 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
150 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
522 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
292 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
1k 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
366 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
745 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
411 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
365 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 ...
12
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
498 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 ...
8
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
336 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
293 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 ...
2
votes
2answers
777 views

Compatibility between DirectX 9 and DirectX 10 shaders

I am a beginner to game development and as I am used to programming in C# I decided to go for XNA. I've been playing around with it for a while and now I am learning the basics of HLSL shaders, I have ...
2
votes
1answer
821 views

Mesh with Alpha Texture doesn't blend properly

I've followed example from various place regarding setting OutputMerger's BlendState to enable alpha/transparent texture on mesh. The setup is as follows: var transParentOp = new ...
5
votes
2answers
1k views

3D primitive rendering library

I am looking for a library which would easily allow me to render shapes (cubes, spheres, lines, circles, etc.) in 3D3 and OpenGL if possible. I want to be able to rapidly design visual debugging tools ...
3
votes
7answers
8k views

GUI for DirectX

I'm looking for a GUI library built on top of DirectX- preferably 9, but I can also do 11. I've looked at stuff like DXUT, but it's way too much for me- I'm only needing some UI controls which I would ...
15
votes
1answer
2k views

The practical cost of swapping effects

I use XNA for my projects and on those forums I sometimes see references to the fact that swapping an effect for a mesh has a relatively high cost, which surprises me as I thought to swap an effect ...
1
vote
1answer
303 views

Materials when rendering geometry

When specifying the material (ambient/diffuse/specular) for use in lighting calculations, what level of detail is the material specified at? Per vertex, mesh, bone?
2
votes
2answers
478 views

Should I start to use DX11 [duplicate]

Possible Duplicate: learning Direct3D 9, 10 or 11 ? I have just started game dev and was wondering should I use DX11 or version 10? I know AMD/nVidia now have DX11 cards but there are not ...
4
votes
3answers
980 views

Model format for small game

I'm writing my own small-time game from scratch, and now I'm looking to start creating models. I've been wondering- what is the best model format to use? Given that I will be writing the model loading ...