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

1464 questions
6
votes
2 answers

D3D11: Creating a cube map from 6 images

How do I create a cube map in D3D11 from 6 images? All the examples I've found use only one .dds. Specifically, how do I upload individual faces of the cube texture?
SurvivalMachine
  • 7,946
  • 15
  • 57
  • 87
6
votes
1 answer

How to query GPU Usage in DirectX?

How to query GPU Usage in DirectX? Specifically DirectX 11. If someone ever did it, could you provide me the code snippet?
6
votes
3 answers

Position of fields (position, normal, etc.) in a D3D9 vertex

I'm trying to read 3D models which were created for a DirectX applications, which are defined in the following way : In the file header, the Flexible Vertex Format (FVF) of the mesh is given (actually, I have any combinations of…
Pierre Bourdon
  • 10,521
  • 4
  • 33
  • 27
6
votes
1 answer

Calculate clipspace.w from clipspace.xyz and (inv) projection matrix

I'm using a logarithmic depth algorithmic which results in someFunc(clipspace.z) being written to the depth buffer and no implicit perspective divide. I'm doing RTT / postprocessing so later on in a fragment shader I want to recompute eyespace.xyz,…
6
votes
1 answer

How do I use the Direct3D Device Manager?

I'd like to share one Direct3D device between multiple threads and objects in my Direct3D application. I came across the Direct3D device manager, which looks like what I want, although I'm not doing any video processing or video…
Christian
  • 61
  • 3
6
votes
1 answer

Convert.ToDecimal giving different results when DirectX/Direct3D loaded

I'm loading data from a MySQL database into a C# .NET application. The data is held in the database as DBType.Double, but for use in my application I cast to Decimal using Convert.ToDecimal(). The data is positional data used in surveying and can be…
jonew
  • 63
  • 3
5
votes
1 answer

How do I set the color of a single pixel in a Direct3D texture?

I'm attempting to draw a 2D image to the screen in Direct3D, which I'm assuming must be done by mapping a texture to a rectangular billboard polygon projected to fill the screen. (I'm not interested or cannot use Direct2D.) All the texture…
Furious Coder
  • 1,160
  • 1
  • 11
  • 17
5
votes
2 answers

Should CUDA stream be waited to be complete even if the output data are to be sent to OpenGL instead of CPU?

This is a general question, and although I use OpenCV as a framework, the question is broader than OpenCV's realm. I am developing an image processing tool that will effectively get image from a webcam (yielding a host-memory located cv::Mat),…
Sprimesson
  • 137
  • 5
5
votes
1 answer

Texture change (and other state-change) costs on modern GPUs

I'm writing a scene-graph based graphics engine for modeling purposes. I'm using XNA 4. On many places I have been reading, that texture changes (and other state changes) should be minimized during rendering (so I have to order my primitives by…
antonfrv
  • 178
  • 7
5
votes
4 answers

How exactly does memory handling (i.e, the function Release) work with Direct3D?

I came across a leak in a Direct3D application of mine, and I ended up correcting it, but I think the cause of the leak was due to my misunderstanding of how Direct3D handles its memory and interfaces. I haven't been able to find a definitive…
Jengerer
  • 1,163
  • 11
  • 27
5
votes
5 answers

Beginning 3D programming / OpenGL

I'm fairly familiar with C / C++ / java, but I have mostly only ever done command line programming (with the exception of GUI in java). I am really interested in 3D programming, but the problem I am having is I feel I know so little that I'm not…
Bob
  • 159
  • 1
  • 5
5
votes
4 answers

Why does Direct3D work only on Windows?

What is the Direct3D? It is an API, is not it? Is it implemented by Windows or by graphics cards? If the graphics cards implement the Direct3D API, why can not other operating systems use Direct3D resources from the graphics card? If Direct3D is…
Squall
  • 4,344
  • 7
  • 37
  • 46
5
votes
2 answers

How can I compile asm shader to fxo file?

I have a compiled fxo shader which I'm trying to edit slightly (just adjusting some constants). Using fxdis (https://code.google.com/archive/p/fxdis-d3d1x/) I can disassemble this shader, this is the output: # DXBC chunk 0: RDEF offset 52 size…
matthias_buehlmann
  • 4,641
  • 6
  • 34
  • 76
5
votes
2 answers

Direct3D: efficient way to get system memory bitmap from IDirect3DSurface9 (default pool)?

I have IDirect3DSurface9, default pool, YUV format. How can I efficiently get bitmap bits from it? At the moment I: create render target: device->CreateRenderTarget(surf_desc.Width, surf_desc.Height, D3DFMT_A8R8G8B8, D3DMULTISAMPLE_NONE, 0, TRUE,…
Andriy Tylychko
  • 15,967
  • 6
  • 64
  • 112
5
votes
5 answers

How to enable VSYNC in D3D windowed app?

So, Im using D3D in a windowed application. I inited D3D with the following parameters: windowed: true; backbufferformat: D3DFMT_X8R8G8B8; presentinterval: D3DPRESENT_INTERVAL_ONE; swapeffect: DISCARD Each time OnPaint is called, I render the image…
St. KG
  • 51
  • 1
  • 1
  • 3