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

using XInput, is it possible to get an image of the controller?

In my simple mind, it seems useful to ship a nice image of your joystick with an index of the button and axis locations on the image. Can such a thing be queried through the XInput or DirectInput APIs? Would it be driver-specific, and if so which…
Brannon
  • 5,324
  • 4
  • 35
  • 83
2
votes
2 answers

In DirectX 9, how to get zbuffer to work properly?

I've been unsuccessful at getting a simple cube geometry with shading turned on to display correctly. This is c# code, but the values are being passed through SlimDX directly to C++ code. pParams.BackBufferWidth = 0; …
Rob Perkins
  • 3,088
  • 1
  • 30
  • 51
2
votes
2 answers

Loading a texture from file post DX11.1?

In 11.1 and later Microsoft removed a lot of helpers for loading textures (fromfile, fromstream etc). I'm trying to port my code over to 11.2 and everything works fine except for this line : var texture = Texture2D.FromFile(device,…
Ronan Thibaudau
  • 3,413
  • 3
  • 29
  • 78
2
votes
1 answer

IDirect3DDevice9, setting how textures scale?

In Photoshop you can control how pictures are scaled up and down as 'image interpolation', it has different options like 'Bicubic', 'Bilinear', 'Nearest Neighbour' and such. I was wondering if I could do something similar in DirectX? Basically if I…
meds
  • 21,699
  • 37
  • 163
  • 314
2
votes
1 answer

How to use instancing offsets

Suppose I have a single buffer of instance data for 2 different groups of instances (ie, I want to draw them in separate draw calls because they use different textures). How do I set up the offsets to accomplish this? IASetVertexBuffers and…
Telanor
  • 4,419
  • 6
  • 29
  • 36
2
votes
0 answers

How do I emulate inputs of a connected joystick / gamepad device?

I don't even know if this is possible. Basically I want to simulate gamepad inputs and I've already found some solutions here on stackoverflow. The common direction seems to be to create a virtual gamepad device that sends all the inputs. What I…
unR
  • 1,298
  • 14
  • 21
2
votes
1 answer

Direct3D: What does the stream number do in device->SetStreamSource?

Where else is the stream number used other than in these two places: GetStreamSource and SetStreamSource?
Agnel Kurian
  • 57,975
  • 43
  • 146
  • 217
2
votes
3 answers

Producing buttons with Direct2D and DirectWrite (C++, DirectX)

I've been looking around for awhile about how to produce buttons using Direct2D and DirectWrite with no luck. I'm comfortable with shapes, text and that jazz. However, it suddenly occurred to me I might be looking about it in the wrong way. Take the…
nat1707828
  • 877
  • 2
  • 11
  • 18
2
votes
1 answer

Terrain tessellation and depth buffer

I am doing some terrain rendering and I've run in the some troubles. At this point in time I am just tessellating vertex patches then displacing them with a height map. My current problem is that the rendering looks pretty funky. I've been debugging…
Eugene
  • 91
  • 1
  • 6
2
votes
1 answer

D3D11_BUFFER_DESC bytewidth "not working"

I'm having some issues with Direct3D. Namely the vertex buffer and its ByteWidth member. I want to draw two quads, so I create my vertex buffer like so: struct Vertex { XMFLOAT3 pos; XMFLOAT3 normal; XMFLOAT2 texCoord; }; .... void…
Semicolon
  • 163
  • 2
  • 16
2
votes
0 answers

How can I access the default depth buffer from a fragment shader?

I am going to port DirectX code to OpenGL and need to choose the right OpenGL version. What I want to do might not even be possible according to what I already read online. As I understand it (I might be wrong though), I can use the default depth…
lochotzke
  • 181
  • 1
  • 4
2
votes
2 answers

SlimDX : How to draw multiple objects?

OK - I'm a complete newbie to SlimDX, DirectX and graphics programming in general and I need to get up to speed. I'm attempting to develop a prototyping app to visualize and debug data that I will eventually be using n a non-graphical…
scotsman60
  • 251
  • 1
  • 10
2
votes
1 answer

Very high CPU usage directx 9

I'm going to use DirectX, so I'm using directxtutorial.com tutorial. When I run my game, it has very high cpu usage. It takes all power of the first core of my processor. I have Celeron e3400. I think it's much more than I need to run my game…
Jancis
  • 97
  • 1
  • 11
2
votes
2 answers

Batching Multiple Draw Calls When Draw Order Matters

I am trying to figure out how to implement batching in my OpenGL/DirectX based applications. I know that when depth test / depth write is enabled, I can put a bunch of objects that render with a common material in the same coordinate space and draw…
default
  • 2,637
  • 21
  • 44
2
votes
1 answer

What to use instead DirectDraw

I've just rebuilt my old DirectDraw based game and I'm very happy with the results! It was one of my first C++ programs in a diectx world. But I was disappointed to discover that DirectDraw is deprecated. After installing DirectX SDK July 2010 there…
netanalyzer
  • 634
  • 2
  • 6
  • 23