Questions tagged [direct3d]

Direct3D is a high-performance, COM-based API for accessing graphics hardware (GPUs) in a device-independent way on Microsoft platforms.

Direct3D is a high-performance, COM-based API for accessing graphics hardware (GPUs) in a device-independent way on Microsoft platforms.

It is typically used for video game development, in contrast to the OpenGL API, which is more often used in data visualization tasks.

There are several versions of the Direct3D API, each of which corresponding to a different generation of graphics hardware.

  • Direct3D 7 incorporated hardware-accelerated transformation and lighting (NVidia Geforce, ATi Radeon).
  • Direct3D 8 added limited support for programmable graphics hardware (pixel and vertex shaders) using a specially-designed shader assembler syntax (NVidia Geforce 3, ATi Radeon 8500).
  • Direct3D 9 greatly improved support for programmable shader hardware, allowing for fairly complex shader programs (NVidia Geforce FX, ATi Radeon 9500), as well as incorporating a high-level language for writing shader programs (HLSL, basically identical to NVidia Cg).
  • Direct3D 10 featured a completely restructured API while removing support for fixed-function hardware and assembler shader programs (NVidia Geforce 8). While previous versions of Direct3D were backwards-compatible, Direct3D 10 works only on capable hardware.
  • Direct3D 11 added support for different levels of graphics hardware functionality, unifying support for "modern" (fully-programmable) as well as "legacy" (fixed-function or partially-programmable) GPUs.

Microsoft's XBox game consoles' GPUs are programmed using a variant of Direct3D (a Direct3D 8 variant on the original XBox, and an improved Direct3D 9 variant on the XBox 360, with added support for some Direct3D 10 features such as tesselation).

More information at http://en.wikipedia.org/wiki/Direct3D

1354 questions
189
votes
17 answers

How are 3D games so efficient?

There is something I have never understood. How can a great big PC game like GTA IV use 50% of my CPU and run at 60fps while a DX demo of a rotating Teapot @ 60fps uses a whopping 30% ?
jmasterx
  • 47,653
  • 87
  • 281
  • 523
81
votes
2 answers

Do conditional statements slow down shaders?

I want to know if "if-statements" inside shaders (vertex / fragment / pixel...) are really slowing down the shader performance. For example: Is it better to use this: vec3 output; output = input*enable + input2*(1-enable); instead of using…
Thomas
  • 1,672
  • 2
  • 17
  • 34
57
votes
2 answers

Rendering meshes with multiple indices

I have some vertex data. Positions, normals, texture coordinates. I probably loaded it from a .obj file or some other format. Maybe I'm drawing a cube. But each piece of vertex data has its own index. Can I render this mesh data using…
Nicol Bolas
  • 378,677
  • 53
  • 635
  • 829
28
votes
9 answers

Polygon Triangulation with Holes

I am looking for an algorithm or library (better) to break down a polygon into triangles. I will be using these triangles in a Direct3D application. What are the best available options? Here is what I have found so far: Ben Discoe's notes FIST:…
Agnel Kurian
  • 53,593
  • 39
  • 135
  • 210
26
votes
3 answers

OpenGL flickering/damaged with window resize and DWM active

I have a wxWidgets application that has a number of child opengl windows. I'm using my own GL canvas class, not the wx one. The windows share their OpenGL context. I don't think the fact it is wxwidgets is really relevant here. The opengl windows…
Pete
  • 4,598
  • 20
  • 30
25
votes
1 answer

Use D3D11 debug layer with VS2013 on Windows 10

In my D3D 11 projects, I always add #if (defined(DEBUG) || defined(_DEBUG)) deviceFlags |= D3D11_CREATE_DEVICE_DEBUG; #endif /* (defined(DEBUG) || defined(_DEBUG)) */ to the device creation flags to enable debug output. Since I upgraded to Windows…
Christoph
  • 1,847
  • 2
  • 26
  • 41
24
votes
4 answers

Why Direct3D application performs better in full screen mode?

The performance of a Direct3D application seems to be significantly better in full screen mode compared to windowed mode. What are the technical reasons behind this? I guess it has something to do with the fact that a full screen application can…
smt
  • 1,141
  • 1
  • 9
  • 13
23
votes
8 answers

OpenGL still better than Direct3D for non-games?

The standard model has been that OpenGL is for professional apps (CAD) and Direct3D is for games. With the debacle of openGL 3.0, is openGl still the natural choice for technical 3D apps (cad/GIS)? Are there scenegraph libraries for Direct3D? …
Martin Beckett
  • 90,457
  • 25
  • 178
  • 252
21
votes
5 answers

What is the purpose of a graphics library such as OpenGL?

I realize this is probably a ridiculous question, but before trying to figure out what libraries to use for which projects, I think it makes sense to really understand the purpose of such libraries first. A lot of video games use libraries like…
user1558737
  • 229
  • 1
  • 2
  • 3
18
votes
5 answers

Direct3D 11 effect files deprecated?

I've been playing around with Direct3D 11 a little bit lately and have been frustrated by the lack of documentation on the basics of the API (such as simple geometry rendering). One of the points of confusion brought on by the sparse documentation…
Toji
  • 31,923
  • 20
  • 95
  • 113
16
votes
7 answers

Should I use DirectInput or Windows message loop?

I'm working on a C++ DirectX 2D game and I need keyboard and mouse input. Wikipedia says: Microsoft recommends that new applications make use of the Windows message loop for keyboard and mouse input instead of DirectInput So how should I use it? I…
Adir
  • 1,393
  • 3
  • 17
  • 31
15
votes
6 answers

How well does WPF blend with XNA in real life?

I understand that there are several ways to blend XNA and WPF within the same application. I find it enticing to use WPF for all GUI and HUD stuff in my XNA games. Does anyone have any practical experience on how well this approach works in real…
bitbonk
  • 45,662
  • 32
  • 173
  • 270
15
votes
4 answers

Direct3D Line thickness

How do I change the thickness of lines when drawing line lists using Direct3D? This post says that line width is not supported and goes on to provide a workaround. Other options? While we are on this topic, do shaders allow one to draw lines with…
Agnel Kurian
  • 53,593
  • 39
  • 135
  • 210
14
votes
1 answer

What happens during a display mode change?

What happens during a display mode change (resolution, depth) on an ordinary computer? (classical stationarys and laptops) It might not be so trivial since video cards are so different, but one thing is common to all of them: The screen goes black…
13
votes
1 answer

Prevent desktop sharing of a particular c# winforms or detect desktop sharing

While developing an examination software I have a requirement to prevent desktop sharing through applications like TeamViewer, AnyDesk, Ammyy Admin etc or at least detection of it. Our examination software is developed in C#, it's a winform renders…
Amogh
  • 4,220
  • 9
  • 36
  • 91
1
2 3
90 91