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)

0
votes
1answer
116 views

Can I publish an indie game on XBL made with directx

So I know that XNA can be used to publish games on Xbox Live Indie Games and I signed up for the $100/year subscription thing. I haven't downloaded XNA yet but I was wondering if I can publish a game ...
7
votes
3answers
748 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
1answer
548 views

DirectX 9.0c and C++ GUI

Well, I'm trying to code a gui for my engine, but I've got some problems. I know how to make a UI overlay but buttons are still black magic for me. Anything I tried was to compilcated ( if it goes big ...
1
vote
1answer
132 views

Texture the quad with different parts of texture

I have a 2D quad. Let say it's position is (5,10) and size is (7,11). I want to texture it with one texture, but using three different parts of it. I want to texture the part of quad from x = 5 to x ...
9
votes
4answers
1k views

Avoid if statements in DirectX 10 shaders?

I have heard that if statements should be avoid in shaders, because both parts of the statements will be execute, and than the wrong will be dropped (which harms the performance). It's still a ...
1
vote
0answers
1k views

Black Screen: How to set Projection/View Matrix [closed]

I have a Windows Phone 8 C#/XAML with DirectX component project. I'm rendering some particles, but each particle is a rectangle versus a square (as I've set the vertices to be positions equally offset ...
3
votes
1answer
179 views

blurry image rendered

I'm using Direct2D to render a PNG image using a ID2D1BitmapRenderTarget and then caling it's GetBitmap() function and rendering the image using ID2D1HwndRenderTarget::DrawBitmap(). Some of the ...
2
votes
1answer
127 views

Do shader program compilers optimise divide-by-PoT-constants to bitshift operations?

So just to restate that, let's say we have this: float f = g / 2; Given the divisor is a constant, will the shader compiler auto-optimise this to a bitshift operation, as some language compilers are ...
3
votes
1answer
732 views

Spherical to Cartesian Coordinates

Well I'm reading the Frank's Luna DirectX10 book and, while I'm trying to understand the first demo, I found something that's not very clear at least for me. In the updateScene method, when I press A, ...
0
votes
2answers
367 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 ...
4
votes
1answer
2k views

In HLSL pixel shader , why is SV_POSITION different to other semantics?

In my HLSL pixel shader, SV_POSITION seems to have different values to any other semantic I use. I don't understand why this is. Can you please explain it? For example, I am using a triangle with the ...
5
votes
1answer
525 views

Zooming into Mouse Position

I'm trying to implement my camera class for a simulation. But I cant figure out how to zoom into my world based on the mouse position. I mean the object under the mouse cursor should remain at the ...
1
vote
1answer
163 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
1answer
163 views

How can I efficiently render a very large model?

I have a huge model I want to draw in my XNA application; due to its size I am experiencing a tremendous loss of performance. The model has about 50,000,000 edges and has a size on disk of 205 MB in ...
3
votes
1answer
518 views

Where is the Shader Designer in Visual Studio?

I have Visual Studio 2012 Ultimate and I've been trying to access the Shader Designer. I searched through MSDN's text and Channel9's videos, but they keep failing to mention how to access it. Can ...
7
votes
3answers
9k views

Does Windows 8 still support DirectX 9?

Is Windows 8 supporting DirectX 9? Because I was looking through some samples written in C++ and DirectX 9 made for Windows 8. It wasn't that, like I know it ( look here ...
-2
votes
1answer
306 views

Confusing Callbacks

I'm trying to programm now a "game", and started with the EmptyProject that's provided by the DirectX SDK. The problem is that the Callbacks are confusing me. Can please someone explain me? Edit: ...
1
vote
2answers
824 views

Optimal way to learn DirectX? [closed]

I am finding it very difficult to learn DirectX 11. The MSDN website is just full of unorganized information that doesn't seem to help at all. I am particularly looking for something that explains ...
2
votes
1answer
135 views

DirectX 9.0c Lights?

I'm still learning DirectX from a book. It says that a graphiccards can only handle 15 lights. I'm just a bit confused , there are a lot of games using more lights, or are this just some alpha ...
-1
votes
2answers
781 views

Game Engine Design

Is there any guide how to or better what a good Game Engine ( for DirectX ) must contain? I've been reading certain books, but I want to get sure. My own Engine ( called KaDI ) contains: ...
1
vote
1answer
100 views

Task Core dividing

How can I divide the tasks for diffrent cores? E.g. 4 Cores func1() -> core1 func2() -> core2 func3() -> core3 func4() -> core4 Is there special libary for this? Or do I have to use the old ...
2
votes
4answers
847 views

Do games use threads?

I 'understand' that the concept of how a game runs i.e while (game_loop = true) { //handle events // input/output/sound etc } But it has come to my attention while programming in another ...
0
votes
1answer
199 views

Player Movement DirectX

I'm reading on a Book that's about Gamedevelopment with C++ and DirectX 9. There is something that interrests me: It says that playermovements are increasing with the power of the CPU. Becouse a ...
1
vote
1answer
114 views

Consistency of DirectX models

Is there a way to check the consistency of a DirectX model (.x) ? Whilst compiling .x files with XNA GameStudio 3.1 compilation is aborted with the following error message: Error 2 Could not read ...
4
votes
3answers
3k 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 ...
5
votes
3answers
207 views

Depth is disabled - How to turn on?

In XNA 3.1 is there any other way to disable depth in 3D Worlds using DirectX models other than GraphicsDevice.RenderState.DepthBufferEnable = false; ? The reason for my question is I have quite a ...
2
votes
1answer
546 views

SharpDx: using maximized RenderForm

I'm trying to learn DirectX via SharpDX, very new to this. What I want to do is be able to draw 2D shapes for a game I'm trying to make. So I started with the demo "MiniRect" that came with SharpDX. ...
2
votes
4answers
2k views

DirectX 11 Constant Buffers vs Effect Framework

I'm having some trouble understanding the differences between using constant buffers or using the effect framework of DirectX11 for updating shader constants. From what I understand they both do ...
0
votes
3answers
437 views

How do I switch from XNA to C++? [closed]

So, I heard somewhere that Microsoft intends to phase out XNA in favour of using the DirectX method. I've always wanted to learn, but all I ever did in XNA was simple 2D games. I was wondering if ...
12
votes
2answers
444 views

Best practice for setting Effect parameters in XNA

I want to ask if there is a best practice for setting Effect parameters in XNA. Or in other words, what exactly happens when I call pass.Apply(). I can imagine multiple scenarios: Each time Apply is ...
4
votes
4answers
495 views

Game programming and quantity of timers

I've made a simple 2D game engine using C# and DirectX and it's fully functional for the demo I made to test it. I have a Timer object that uses QueryPerformanceCounter and I don't know what's the ...
-1
votes
1answer
166 views

Rendering projectiles [closed]

I'm working on a simple game that has the user control a space ship that shoots small circular projectiles. However, I'm not sure how to render these. Right now I know how to make a LPDIREC3DSURFACE ...
17
votes
3answers
2k views

What's the difference between mesh and a model?

Which one is created first? For example if a team worked on a graphical asset of a car, what would be a model and what would be a mesh of the car?
10
votes
1answer
1k views

Information about rendering, batches, the graphical card, performance etc. + XNA?

I know the title is a bit vague but it's hard to describe what I'm really looking for, but here goes. When it comes to CPU rendering, performance is mostly easy to estimate and straightforward, but ...
3
votes
3answers
639 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: ...
3
votes
2answers
2k views

Pix for visual studio express 2012 (Desktop)

(Originally asked on stackoverflow) Using visual c++ express 2010 for direct3d you have to download the directX sdk and there is a tool called pix for debugging shaders, looking at 3d resources etc. ...
0
votes
1answer
291 views

Possible / How to render to multiple back buffers, using one as a shader resource when rendering to the other, and vice versa?

I'm making a game in Direct3D10. For several of my rendering passes, I need to change the behavior of the pass depending on what is already rendered on the back buffer. (For example, I'd like to do ...
3
votes
1answer
367 views

D3DXMatrixDecompose gives different quaternion than D3DXQuaternionRotationMatrix

In trying to solve this problem, I tracked down the problem to the conversion of the rotation matrix to quaternion. In particular, consider the following matrix: -0.02099178 0.9997436 -0.008475631 0 ...
3
votes
2answers
313 views

Having the same texture data in different ID3D11Texture2D

Sorry if this has been answered elsewhere - I'm rather new to DX. My question concerns conservation of resources - specifically textures in VRAM. I assume that upon returning from a call to ...
2
votes
1answer
185 views

Problem with D3DXMatrixReflect

Currently I am trying to reflect a sky sphere into a flat piece of geometry which is acting as water. The sphere is very small, it follows the camera on all 3 axis and the z-buffer is turned off so it ...
1
vote
0answers
349 views

Managing many draw calls for dynamic objects

We are developing a game (cross-platform) using Irrlicht. The game has many (around 200 - 500) dynamic objects flying around during the game. Most of these objects are static mesh and build from 20 - ...
10
votes
6answers
21k views

Visual Studio 2012 and Game Development [closed]

Alright, I think it's a simple question, but I got difficulties to find some answers around. I already read that XNA wouldn't be in Visual Studio 2012. I recently learned to use XNA, but since I ...
1
vote
1answer
483 views

ERROR #342: DEVICE_SHADER_LINKAGE_SEMANTICNAME_NOT_FOUND

I've stared at this for at least half an hour now and I cannot figure out what directx is complaining about. I know this error normally means you put float3 instead of a float4 or something like ...
2
votes
1answer
289 views

Regarding cel-shading of existing games

Is it possible to cel-shade existing games through API interception? I would assume yes. If done properly, could cel-shading be used as a rendering optimization technique? This means, rather than ...
3
votes
2answers
333 views

How to reconcile depth ordering with minimal shader context changes?

We generally want to minimise shader-program switches (glUseProgram and all associated context changes) for the sake of performance. AFAIK it is not uncommon to render by shader program, i.e. group ...
-1
votes
1answer
141 views

DirectX UV Coordinates not responding?

My UV coordinates never respond to me for some reason. It is just UV mapping itself in the smallest way possible. It's a tile-able texture and the program is subdividing so much I can't even zoom in ...
0
votes
2answers
1k views

OpenGL matrix vs DirectX matrix

I'm working on an animation and model exporter from Maya to use within my game. Currently, models work perfectly, and animations have some issues with the joints. Since Maya works in an OpenGL ...
-1
votes
1answer
176 views

Desktop twist, does anyone know how to implement this effect in DirectX?

http://my.tv.sohu.com/u/vw/26933139 I didn't know what the exactly name for this effect, so I just paste the link of the video here, I want to know what is the knowledge background needed if I want ...
1
vote
2answers
235 views

How does my program know which variables to link to the shader?

I am using DirectX and C++. I never understood how my VertexDeclaration knew what variables were the UV map and which were linked to the position. I have in my shader Position : POSITION and Texture : ...
2
votes
1answer
753 views

Multi-textured Terrain?

How would I accomplish multi-textured terrain? I need to know how to write the HLSL shader for it. The world already UV maps itself and I can get it to do 1 texture at a time. But I want more than 1 ...