Questions tagged [directx]

DirectX is a collection of APIs for handling tasks related to multimedia, especially 3D graphics and game programming and video, on Microsoft platforms.

Microsoft DirectX is a collection of APIs for handling tasks related to multimedia, especially 3D graphics and game programming and video, on Microsoft platforms. Originally, the names of these APIs all began with Direct, such as Direct3D, DirectDraw, DirectMusic, DirectPlay, DirectSound, and so forth. The name DirectX was coined as shorthand term for all of these APIs (the X standing in for the particular API names) and soon became the name of the collection.

More information at Wikipedia article of DirectX

References & Tutorials:

5860 questions
2
votes
2 answers

About The Camera Function D3DXMatrixLookAtLH() in Direct3D

In the description of the Function D3DXMatrixLookAtLH(), the x-axis is equals to " normal( cross ( UpVec , z-axis ) ) " since we know that z-axis is the result of normal( AtVec - EyePosVec ) , most of time , we can calculate the matrix without any…
ZengCheng
  • 23
  • 3
2
votes
1 answer

Calculating Rigid body Inertia Tensor world coordinates

I'm trying to implement a small rigid body physics simulation, using DirectX to draw my objects and its Math library to take advantage of SIMD calculation (XMMATRIX and XMVECTOR classes). My question is about the Inertia Tensor, I know that using…
Daniel
  • 223
  • 4
  • 9
2
votes
1 answer

3D Graphics Picking - What is the best approach for this scenario

I am working on a project which allows users to pick 3d objects in a scene and I was wondering what everyone thought would be the best way to approach this particular scenario. Basically we have a scene with at least 100 objects (they are low-poly…
poncho
  • 1,100
  • 2
  • 15
  • 38
2
votes
2 answers

Better way to check game objects collisions

guys! I have a problems with processing collision of game objects (with other sizes). My algorithm is: for (Array::iterator it = objects.begin(); it != objects.end(); it++) { RECT objRect = (*it)->GetBoundingBox(); for…
Dmitry K.
  • 3,065
  • 2
  • 21
  • 32
2
votes
3 answers

Matrix classes Directx & OpenGL

I have the following C++ matrix class: transform.h transform.cpp I am using this coupled with a renderer, for which there is an opengl and a directx implementation. I have a test example where the coordinates of the mouse within the window are used…
Tom J Nowell
  • 9,588
  • 17
  • 63
  • 91
2
votes
1 answer

C++ DirectX9 incorrect sprite rotation

I have a problem with sprite rotation. Sprite is missing from screen after rotation, why? I just want rotate sprite on 270 degress (4.712 radian). D3DXMATRIX…
Dmitry K.
  • 3,065
  • 2
  • 21
  • 32
2
votes
1 answer

C++ & DirectX 9 - Parse Error when calling D3DXLoadMeshFromX

I have been working on an incredibly simple 3D game in C++ / DirectX 9. I quickly modelled a mesh in Blender, and exported it to the .X format. When I use D3DXLoadMeshFromX("mesh.x", D3DXMESH_MANAGED, NULL, NULL, &materialBuffer,…
user2578223
2
votes
2 answers

How to store a vector of LPD3DXSPRITE objects?

Let's say I want to store a vector of LPD3DXSPRITE objects. The line to declare this code would be std::vector sprites; I should be able to create my sprite with: LPD3DXSPRITE sprite = NULL; D3DXCreateSprite(myRenderingDevice,…
user189320
2
votes
2 answers

DirectX managed or unmanaged?

I need basic information about DirectX. Is it a managed API or Unmanaged? Can someone provide me some link etc. explaining this?
viky
  • 17,275
  • 13
  • 71
  • 90
2
votes
0 answers

DirectX CreateGeometryShader fails with E_INVALIDARG

I am using a geometry shader in my DirectX application which is compiled using shader model 4.0 (gs_4_0). The shader works correctly on my development pc with a DirectX 11 card but fails on two client PCs with DirectX 10.1 cards. The application…
gareththegeek
  • 2,362
  • 22
  • 34
2
votes
1 answer

Direct3D 10 Hardware Instancing using Structured Buffers

I am trying to implement hardware instancing with Direct3D 10+ using Structured Buffers for the per instance data but I've not used them before. I understand how to implement instancing when combining the per vertex and per instance data into a…
gareththegeek
  • 2,362
  • 22
  • 34
2
votes
1 answer

Converting YUV422 to RGB using GPU shader HLSL

I'm considering to perform the color space conversion from YUV422 to RGB using HLSL. A four-byte YUYV will yield 2 three-byte RGB values, for example, Y1UY2V will give R1G1B1(left pixel) and R2G2B2(right pixel). Given texture coordinates in pixel…
user2619459
  • 21
  • 1
  • 4
2
votes
1 answer

DirectX on Windows Phone 8 - Context/Device lost on minimizing

I am using XAML/C# + C++ app with DrawingSurfaceBackgroundGrid for DirectX11 as interop. When using DrawingSurfaceBackgroundGrid it seems that Connect() and Disconnect() are called immediately when the app is suspended to background. When…
Grapes
  • 2,473
  • 3
  • 26
  • 42
2
votes
2 answers

DX11 created textures are white

I am trying to load a basic texture (1024x1024) and fill it with a solid color: unsigned char *texArray = (unsigned char *)malloc(4 * 1024 * 1024 * sizeof(unsigned char)); for (int i = 0; i < 1024 * 1024 * 4; i++) { texArray[i] = (unsigned…
Grapes
  • 2,473
  • 3
  • 26
  • 42
2
votes
1 answer

Hardcoding HLSL Shader

I have a shader written in HLSL that I do not want the user to be able to access. Is there a way I can go about compiling from a section of memory. The problem is that the following function accepts an LPCSTR in order to use a .fx file as input: …
Joseph Pla
  • 1,600
  • 1
  • 10
  • 21
1 2 3
99
100