directx-11

Error LNK2019: unresolved external symbol _wWinMain@16 referenced in function ___tmainCRTStartup

给你一囗甜甜゛ 提交于 2019-12-10 12:14:02
问题 I have started with DirectX 11 and get these compilation errors: Error 1 error LNK2019: unresolved external symbol wWinMain@16 referenced in function _ _tmainCRTStartup Error 2 error LNK1120: 1 unresolved externals(I figure that this error is because of the error just above this one) I have searched around for fixes to this problem for quite a while, yet I cannot find any fixes to this problem on this site or any other sites via google. I am using Visual Studio 2012 and c++ for this project.

Problems to understand DXGI DirectX 11 Desktop Duplication to get a Buffer or Array

北城以北 提交于 2019-12-10 11:56:06
问题 I want to understand DXGI Desktop Duplication. I have read a lot and this is the code I copied from parts of the DesktopDuplication sample on the Microsoft Website. My plan is to get the Buffer or Array from the DesktopImage because I want to make a new Texture for an other program. I hope somebody can explain me what I can do to get it. void DesktopDublication::GetFrame(_Out_ FRAME_DATA* Data, _Out_ bool* Timeout) { IDXGIResource* DesktopResource = nullptr; DXGI_OUTDUPL_FRAME_INFO FrameInfo;

Texture streaming in DirectX11, Immutable vs Dynamic

旧街凉风 提交于 2019-12-10 11:19:19
问题 We often have the case where we need to stream textures to the graphics card (in game case: terrains, in my case image from different input sources like cameras/capture cards/videos) Of course in camera case, I receive my data in a separate thread, but still need to upload that data to the GPU for display. I know 2 models for it. Use a dynamic resource: You create a dynamic texture which has the same size and format as your input image, when you receive a new image you set a flag that tells

OpenGL state redundancy elimination Tree, render state priorities

穿精又带淫゛_ 提交于 2019-12-09 12:55:55
问题 I am working on a Automatic OpenGL batching method in my Game Engine, to reduce draw calls and redundant calls. My batch tree design begins with the most expensive states and adds leafs down for each less expensive state. Example: Tree Root: Shaders / Programs Siblings: Blend states ... a.s.o. So my question is what are most likely the most expensive calls, in this list: binding program binding textures binding buffers buffering texture, vertex data binding render targets glEnable / glDisable

Direct3D c++ api how to update vertex buffer?

白昼怎懂夜的黑 提交于 2019-12-08 10:18:02
问题 So how can one update values in vertex buffer bound into device object using IASetVertexBuffers method? Also will changing values in this buffer before call to Draw() and Present() ? Also will the image be updated according to these new values in buffer? 回答1: To update a vertex buffer by the CPU, you must first create a dynamic vertex buffer that allows the CPU to write to it. To do this, call ID3D11Device::CreateBuffer with Usage set to D3D11_USAGE_DYNAMIC and CPUAccessFlags set to D3D11_CPU

How can I migrate between versions?

℡╲_俬逩灬. 提交于 2019-12-08 08:30:05
问题 What are changes from directx 10 to 11? Ive written some code in directx 10 and I want to change it to directx 11. Is this just about quality and I can do it just by changing headrs and dll files or functions and way of coding have been changed? ing. 回答1: First, I need to say, that nothing will change if you just change your D3D10DoSomething() functions to D3D11DoSomething() . They will do same things. No passive gain. You must use new features explicitly to make your app better. Those

Intermittent Access Violation ID2D1RenderTarget::EndDraw

此生再无相见时 提交于 2019-12-08 04:46:18
问题 I have my Direct2D drawing loop which is running successfully for hours, even days, except for the intermittent access violation error. There is no pattern for this to happen, mostly after several hours, sometimes after just a few seconds. Unhandled exception at 0x5f990099 (d3d11.dll) in XX.exe: 0xC0000005: Access violation reading location 0x00000fe0. I am keeping a log of the return HRESULT of EndDraw if not successful. All the previous EndDraw s seem to return S_OK . There aren't any other

How to turn on DX11 feature level 11.0

喜你入骨 提交于 2019-12-08 02:56:23
问题 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. 回答1: 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,

DirectX::XMMATRIX error C2719: __declspec(align('16')) won't be aligned

我与影子孤独终老i 提交于 2019-12-08 02:04:01
问题 Ok so im working on my own DirectX framework all tutorials about making a DirectX framework are old and use deprecated stuff so i just made my own one , though i took somethings from the old tutorials and updated them to work with the new Windows 8.1 SDK and here comes The problem , i get errors with XMMATRIX the original code uses D3DXMATRIX (33): error C2719: 'unnamed-parameter': formal parameter with __declspec(align('16')) won't be aligned (40): error C2719: 'unnamed-parameter': formal

DirectX11 CreateWICTextureFromMemory Using PNG

家住魔仙堡 提交于 2019-12-08 01:52:42
问题 I've currently got textures loading using CreateWICTextureFromFile however I'd like a little more control over it, and I'd like to store images in their byte form in a resource loader. Below is just two sets of test code that return two separate results and I'm looking for any insight into a possible solution. ID3D11ShaderResourceView* srv; std::basic_ifstream<unsigned char> file("image.png", std::ios::binary); file.seekg(0,std::ios::end); int length = file.tellg(); file.seekg(0,std::ios::beg