directx

Understanding Shader Programming

人盡茶涼 提交于 2019-12-06 05:54:40
I am trying to understand shader programming, but at this point, documentation wont help me further. 1] Does the data type & size of the buffers have to match? In the DX tutorial 4 from the DX SDK, they have a struct: struct SimpleVertex{ XMFLOAT3 Pos; XMFLOAT4 Color; }; While in their shader file, they define: struct VS_OUTPUT{ float4 Pos : SV_POSITION; float4 Color : COLOR0; }; They define Pos as a vector of 3 in one file, while it is 4 in another. How is this correct? I thought the size of the data have to match. 2] To create another constant buffer, is this the steps I need to do? // Make

Speeding up an L-System renderer in C#/WPF

本秂侑毒 提交于 2019-12-06 05:53:48
lsys is a blazing fast L-System renderer written in CoffeeScript. Below is a simple renderer in C# and WPF. It is hardcoded to render this example . The result when run looks as follows: A mouse-click in the window will adjust the angleGrowth variable. The re-calculation of the GeometryGroup as well as building the Canvas usually take much less than a tenth of a second. However, the actual screen update seems to take much longer. Any suggestions for how to make this faster or more efficient? It's currently way slower than the CoffeeScript/JavaScript version... :-) using System; using System

NSIS script - download .NET framework, DirectX

别说谁变了你拦得住时间么 提交于 2019-12-06 05:51:35
问题 Can a NSIS script download .NET and DirectX from microsoft, then install it? I don't want to include the installers in my installer because they are huge. 回答1: Here's an example for .Net : Function GetDotnet ;// looks for local copy before downloading, returns path in $0 Pop $0 ${If} ${FileExists} "$InitDir\dotnetfx35.exe" StrCpy $0 "$InitDir\dotnetfx35.exe" ${ElseIf} ${FileExists} "$InitDir\dotnetfx35setup.exe" StrCpy $0 "$InitDir\dotnetfx35setup.exe" ${Else} Call DownloadDotnet StrCpy $0 $0

Cleaning up in Shutdown() method instead of destructor

这一生的挚爱 提交于 2019-12-06 05:50:13
问题 In Rastertek DirectX tutorials they have empty constructors and destructors and instead use initialize() and shutdown() functions for objects initialization and cleaning up. After using this design for a while I can somewhat understand the benefits of having an initialize() method, but I can't see how using a shutdown() method is any better than putting all the clean-up code in the destructor. The reason they provide is the following: You will also notice I don't do any object clean up in the

DirectX 12 - Descriptor heaps

孤街浪徒 提交于 2019-12-06 05:36:19
I've just been starting to learn the new DirectX 12 API. I want to write sone kind of rendering engine on top of dx12 and during initialization I'm supposed to create descriptor heaps. The problem with that is that at this point in time I don't know how many resource views I will create in the future. e.g. if I want to include some kinds of post processing effects which require render to texture approaches I have to create render target views for the textures I'm rendering to. The amount of those RTVs can vary though. So how do you create descriptor heaps being big enough to cope with every

Where can I find 'winmm.lib' (I'm using Visual Studio 2012)

淺唱寂寞╮ 提交于 2019-12-06 05:35:13
问题 My OS is 64Bit Windows 7. I wanted to build the DirectX Sample in C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Samples\C++\Direct3D10\Tutorials\Tutorial02. but when I build error occured with fatal error LNK1104: 'winmm.lib' can't open the file. I reinstalled Direct SDK, but no change. I also added the path (include, lib) to the settings. If I remove 'winmm.lib' from the project settings, 'comctl32.lib' can't be opened. both libs were already present in properties>Linker>Input.

syntax error: identifier 'DXGI_RGBA in file dxgi1_2.h

送分小仙女□ 提交于 2019-12-06 05:03:56
Trying to integrate the Directx toolkit into my game. I followed the steps here: https://github.com/Microsoft/DirectXTK/wiki/Adding-the-DirectX-Tool-Kit and everything went great. When trying to include one of the headers (SpriteFont.h) I get these errors : I've refactored the project to 8.1 to match my game, and rebuilt the imported project and it works great. It's when rebuilding my project that I get these error. (I've already made sure windows.h is being included before my directx headers. Help! More than likely you are mixing the legacy DirectX SDK headers with the Windows 8.x SDK headers

How to turn on DX11 feature level 11.0

一世执手 提交于 2019-12-06 05:03:46
I'm trying to run Dead by Daylight. I know I'm running DirectX 11, but it says feature level 11.0 is needed. how do I fix this? I am ready to post any log if necessary. The version of the DirectX Runtime you have installed which describes what the OS software can support is not the same thing as the Direct3D Hardware Feature Level which describes the support your video hardware provides. See this blog post and MSDN: Direct3D feature levels For example, if you have Windows 7 installed, then you have the DirectX 11.0 Runtime or the partial DirectX 11.1 Runtime update. If you have Windows 8.1,

DirectX Release build works through VS2010, but not exe

ε祈祈猫儿з 提交于 2019-12-06 04:44:23
I've been dropping by Stack Overflow for a few years now via Google, but haven't asked/answered anything as of yet, so here goes. Basically I have a 3D rendering framework set up drawing models and terrain in DirectX 11. Everything works fine, with no problems when running either Debug or Release builds through Visual Studio 2010. However, when I navigate into my folders and run the executables independantly, only the Debug build works. The Release build displays whatever clear colour I have set, but no geometry, although the framerate looks as though it's running, and my mouse is locked to

Transparent widget with QtQuick 2.0

人走茶凉 提交于 2019-12-06 04:07:56
问题 I'am trying to create a transparent window with QtQuick 2.0. I can create a transparent widget like that: class TransparentWidget : public QWidget { public: TransparentWidget(QWidget* parent) : QWidget(parent) { resize(QSize(500, 500)); setAttribute(Qt::WA_TranslucentBackground); setWindowFlags(Qt::FramelessWindowHint); } void paintEvent(QPaintEvent * event) { QPainter painter; QBrush brush(Qt::cyan); painter.begin(this); painter.setRenderHint(QPainter::Antialiasing); painter.setBrush(brush);