Tagged Questions

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)

1
vote
1answer
188 views

Texture Shaders vs. Pixel/Fragment Shaders?

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 ...
-1
votes
1answer
206 views

Are there any open-source Direct X code-bases that I can look at to learn from as a beginning Direct X and graphics programming student? [closed]

I'm a third-year university student and I've recently begun studying Direct X 11. Mostly I've been following the samples from the SDK and reading a lot out of the MSDN. Although I have a decent ...
1
vote
1answer
59 views

PIX and Metro apps

I would like to use Pix on a Metro (Win 8) app. However, Pix wants the path to the application, something that Metro apps don't have. Has anybody been able to get Pix working with Metro?
6
votes
2answers
1k views

In DirectX 11, batching primitives for performance, how does this actually work?

I don't seem to be able to understand this. Microsoft says that one of the possible optimizations of for a Direct3D 11 if to batch primitives draw calls. For example in order to draw say 300 triangles ...
1
vote
1answer
548 views

Can not enable IME to capture Chinese characters in SharpDX

Just found that direct integration of IME is blocked in Windows 8, moving on to TSF now. By now, there is lack of Microsoft's Document about TSF, this will be hard. I am using SharpDX and the ...
-3
votes
1answer
938 views

Which should I learn: DirectX or XNA? [closed]

I've worked with the Microsoft Foundation Classes(MFC) and now I want to enter the world of game development.But should I start with directX or XNA? I'm hesitant towards DirectX because I feel it ...
0
votes
1answer
248 views

Render just the pixel under mouse cursor in DirectX

I'm having difficulties rendering just a single pixel which is on the defined coords of viewport. I'm using D3DXMatrixPerspectiveOffCenter function, but the result is not what I expected. Here is ...
1
vote
2answers
395 views

DirectX How to Gernerate Vertices for Diamond Shape and Render it?

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 ...
3
votes
2answers
106 views

using DirectX to generate a sprite sheet

I am building a site in HTML5 for my client and it must run on the iPad/iPhone (i.e. Safari on iOS). They want a 3D effect where they have a simple, yet, specific product they want to show on the ...
-1
votes
1answer
146 views

simple win32 window wont show [closed]

The program compiles and runs successfully but does not show a window, it simply ends immediately. #include <Windows.h> LRESULT CALLBACK WndProc( HWND hwnd, UINT message, WPARAM wParam, ...
0
votes
1answer
78 views

Sprite rotation and question about sampler state

I'm not an expert in creating game engines, but I'm doing fine for now. Recently I reached a point that I couldn't solve any of my problems. I have two questions: I'm using ...
-2
votes
1answer
133 views

How to use D3DXIntersectTri function to find intersected point?

How to calculate direction for D3DXIntersectTri function to find intersected point? And after getting the result in Distance how to get that coordinate(XYZ)?
1
vote
1answer
252 views

Passing multiple colors to a pixel shader in DirectX

I have a pixel shader that sets the output color based on the interaction of an input texture, sort of like: if (case1) { output.Color = float4(0, 0, 0, 0); } else if (case2) { output.Color = ...
2
votes
0answers
134 views

Best approach to depth streaming via existing codec [closed]

I'm working on a development system (and game) intended for games set mostly in static third-person views. We produce our scenery by CG and photographic techniques. Our background art is rendered ...
0
votes
1answer
212 views

How do I implement my old OpenGL-based gfx_render_triangle_list using DX11?

I am working at a game that has lots of procedural content. I had built a game engine using OpenGL that handles everything needed for creating a basic 2D game, sprites, primitives, blending, polygons ...
0
votes
1answer
766 views

Latency difference between DirectSound and XAudio2

As far as I understand the WDM, DirectSound drivers cannot be hardware accelerated on Windows Vista and newer. Is XAudio2 affected as well? Or in other terms: in latency terms is it definitely better ...
0
votes
2answers
263 views

D3DXCreateEffect Performance

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 ...
2
votes
1answer
147 views

Emulate border color texture address mode efficiently

In WinRT the border color texture address mode is not supported. The best I came up with in emulating the border address mode, is doing this in my pixel shader: float4 tcol = tex.Sample(texSampler, ...
-1
votes
1answer
339 views

How to Render Cylinder with built in function D3DXCreateCylinder in Directx9 with Delphi-Xe2 and JEDI? [closed]

I'm new to Directx and i want to render Cylinder using "D3DXCreateCylinder" function. I using Delphi Xe2 and JEDI for DirectX9.
3
votes
1answer
598 views

Rotation matrix from OpenGL to DirectX

I have an application which uses openGL and i have to port it to DirectX. To sum up my issue : How can I port rotation matrix based on a right-handed coordinate system to a left-handed coordinate ...
2
votes
2answers
620 views

Camera frustum calculation coming out wrong

I'm trying to calculate a view/projection/bounding frustum for the 6 directions of a point light and I'm having trouble with the views pointing along the Y axis. Our game uses a right-handed, Y-up ...
0
votes
3answers
726 views

Using DirectX9 within Visual Studio 2012 in Windows 8?

Asking the question here simply because my PC is down for the count for a while and wasn't able to stave a curiosity before that happened. I picked up a few books about programming Games in DirectX, ...
-4
votes
1answer
139 views

My 2d Shader in XNA falls apart the second I put it into Farseer [closed]

I wrote a simple light shader that I tested in a simple 2d spaceship shooter and it worked fine. Once I imported it into my friend's farseer project with rotatable shapes, it doesn't seem to work ...
0
votes
1answer
262 views

How do I create a camera for a strategy game?

How do I make a camera for a strategy game? Think something in the style of Warcraft 3, so you can lower the camera angel and view the world in a somewhat 3D format. Do I need to have some coordinate ...
2
votes
2answers
166 views

One or multiple VertexBuffers

I'm currently working on a personal project where I'm trying to load the levels and all of the geometry from the game "Medal of Honor Allied Assault" into my own C# code-base based on SharpDX. I ...
3
votes
2answers
533 views

Implementing multithreaded loading screens

Ok, I have fairly little multi-threading experience, but i have done a similar thing before without issue...but this has me stumped. This is in C++, Directx9 Visual Studio... My game basically runs ...
3
votes
1answer
314 views

How do I improve terrain rendering batch counts using DirectX?

We have determined that our terrain rendering system needs some work to minimize the number of batches being transferred to the GPU in order to improve performance. I'm looking for suggestions on how ...
2
votes
1answer
169 views

Geometry shaders on Surface RT

Can anyone tell me if geometry shaders are supported on the Microsoft Surface RT? On one hand, MSDN makes it sound like the Surface RT supports only feature level 9_1, and geometry shaders are only ...
1
vote
1answer
739 views

How can I render multiple windows with DirectX 9 in C++?

I'm trying to render multiple windows, using DirectX 9 and swap chains, but even though I create 2 windows, I only see the first one that I've created. My RendererDX9 header is this: #include ...
2
votes
2answers
222 views

Why does matrix multiplication lead to different result if it's done on CPU, compared to GPU(shader)?

If I'm calculating a "camera space" on the CPU, by multiplying the view with the projection matrix on the CPU , and afterwards multiplying the world to the result my vertices do not pass to the pixel ...
3
votes
1answer
461 views

Matrix in constant buffer on the GPU contains NaNs but not on the CPU

I've got a shader with the following constant buffer: cbuffer ShaderParameters { matrix inverseViewProjectionMatrix; float4 cameraPosition; }; When using Visual Studio 2012's graphic ...
1
vote
0answers
234 views

Converting Animation data from Maya to DirectX in C++

I am currently trying to export an animation from Maya and import to a program I am working on. One of the problems I currently have is that when imported, the mesh and animation data looks reversed ...
10
votes
2answers
597 views

Managing graphic state and components?

I often tend to do a lot of premature optimazation when dealing with graphics. There are a few principles I always try to follow: Keep the number of D3D components to a minimum. (Render states, ...
4
votes
1answer
464 views

What happens to data between vertex shader and pixel shader?

Short version: What can happen to the output of a vertex shader that leads to no(or very few) pixels being drawn, especially in relation to a perspective matrix. Long version: My problem refers to ...
3
votes
1answer
765 views

creating a UI menu in c++

Im currently working on a 2D Game where the users can interact with specific nodes and are able to edit certain bits of information and I also plan for the users to be able to click buttons to set ...
0
votes
1answer
146 views

Strange rendering in Direct3D 10 [closed]

I'm writing an application which renders graphics on the screen. The application can switch between Direct3D9 and Direct3D10 graphics modules (I wrote DLLs that wrap both D3D9 and D3D10). When trying ...
4
votes
1answer
483 views

Applying an outline effect to primitives

I am trying to draw an outline on a collection of quads in Direct3D. I have three intersecting quads on the same plane in the following configuration: (The different colors here are just to ...
3
votes
1answer
1k views

Proper use of Dynamic Vertex Buffers for rapid update

I am creating a C#/SharpDx/DirectX10 application to plot line charts in a fast way. I have a prototype which uses Dynamic Vertex Buffers and fills a fixed-size buffer, say 1M vertices, with new data ...
2
votes
1answer
509 views

How to debug Direct3D resource leak?

When I close my application, I get the following errors in the Direct3D Debug output: Direct3D9: (INFO) :MemFini! Direct3D9: (ERROR) :Memory still allocated! Alloc count = 20 Direct3D9: (ERROR) ...
2
votes
2answers
170 views

How to correctly check for HW T&L on Direct3D?

In theory, to check for HW T&L in Direct3D, one calls IDirect3D9::GetDeviceCaps and checks for the HWTRANSFORMANDLIGHT flag to be set in the returned structed. However, the documentation states: ...
2
votes
1answer
558 views

Render video from file to DirectX11 texture

Is there a way to render a video from file (avi, mp4, etc...) to a texture in a directx11 environment? If so, how?
0
votes
1answer
258 views

Rendering a minimap from large bitmap

I'm trying to create a minimap for my game but am having an issue. I'm using Direct2D as the graphics API and have a ID2D1Bitmap* which contains the pixel data for the loaded area of the world. I'd ...
4
votes
4answers
729 views

Why do most game devs prefer OGL for OS X and D3D for Windows? [closed]

Today I decided to check what Diablo 3 developers used to do graphics: OpenGL or Direct3D? My mind was completely blown: For Windows, they've used D3D and for OS X they've used OGL. I did some ...
1
vote
1answer
209 views

Specular Maps, understanding cryengine hints

i am reading the cryengine documentation, but i don't understand the following hint. Is there any reference to know the logic behind it? "Create proper specular maps for the objects, and then store ...
1
vote
0answers
175 views

DirectX Effects Framework alternative [closed]

Now that the DirectX Effects framework has been axed, are there any other similar frameworks out there ? I now there's Nvidia CGFX, but does that work with the latest DirectX versions ? I'd rather not ...
0
votes
1answer
430 views

Stencil buffer and transparent pixels

Do transparent pixels cause a stencil buffer operation (increment, decrement, etc.) to be executed? My understanding was that only opaque pixels cause a stencil buffer operation, transparent pixels ...
1
vote
2answers
546 views

Tile-based game with DirectX - issues with transparency and StretchRect

In my current project I have a class which loads a map file and then it should load all associated tilesets (no transparent tiles - I used to work with magenta as a colorkey) and precreate a surface ...
0
votes
2answers
472 views

Multipass shader in DirectX 11

As far as I understand for DirectX11 it is recommended to have multiple single pass shaders, so the the method with multiple passes in one shader file is deprecated. Is my understanding correct and ...
1
vote
1answer
118 views

How can I get a pointer to ID3DX11EffectShaderVariable from ID3DX11Effect

I'm using the DirectX Effects framework and I want to create an input layout automatically when compiling an effect. I've tried to call ID3DX11Effect->GetVariableByName() with the shader's name, to ...
1
vote
1answer
453 views

2D Matrix Transformation (with a Player and Ground)

I have a simple game that I'm trying to do for learning purposes, but Matrices are a bit hard, especially in DirectX. I currently have a tilesystem that renders tiles at the screen and a character ...