rate up
1
rate down
D3D11_INPUT_ELEMENT_DESC error
I keep getting this error: Severity Code Description Project File Line Suppression State Error (active) E0304 no instance of function template "RtlpNumberOf" matches the argument list Error (active) E0070 incomplete type is not allowed On his code: D3D11_INPUT_ELEMENT_DESC layout[] = { { "POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 }, { "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 12, D3D11_INPUT_PER_VERTEX_DATA, 0 }, { "NORMAL", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 20, D3D11_INPUT_PER_VERTEX_DATA, 0 }, { "TANGENT", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 32, D3D11_INPUT_PER_VERTEX_DATA, 0 } }; UINT numElements = ARRAYSIZE(layout);
Comments
I think that error may be pointing to this place, but the problem can be elsewhere. Can you post code where you init d3d??
on Feb 24 `18
maxiorek82
rate up
1
rate down
#pragma once #include <wrl.h> #include <wrl/client.h> #include <wrl.h> #include <d3d11_1.h> #include <d2d1_1.h> #include <d2d1effects.h> #include <dwrite_1.h> #include <wincodec.h> #include <DirectXMath.h> #include <xaudio2.h> #include <xaudio2fx.h> #include "resource.h" #include "NuiApi.h" #include <mmreg.h> #include <mfidl.h> #include <mfapi.h> #include <mfreadwrite.h> #include <math.h> #include "GameContentAxis.h" #include <dxgi.h> #include <d3dcommon.h> #include <d3d11.h> #include <XInput.h> #include "BeatdownMain.h" #include <vector> #include <fstream> #include <istream> #include <stdio.h> #include <memory> #include <ppltasks.h> #include <agile.h> #include <dxgidebug.h> #include <dxgi1_6.h> #include <dxgi1_5.h> #include <dxgi1_4.h> #include <d3d11_3.h> #include <d2d1_3.h> #include <d2d1effects_2.h> #include <dwrite_3.h> #include <wincodec.h> #include <DirectXColors.h> #include <DirectXMath.h> #include <memory> #include <agile.h> #include <concrt.h> #include <collection.h> #include <exception> #include "tchar.h" #include "App.xaml.h" #include "DDSTextureLoaderDDSTextureLoader.h" #include "GameContentModel.h" #include "GameContentArena.h" #include "GameContentBoxer.h" using namespace DirectX; using Microsoft::WRL::ComPtr;
Comments
These are only includes and I feel like it is a header file. This will tell nothing. One thing: Never use namespaces in header files. It can make you a headache in certain situations
on Feb 26 `18
maxiorek82
I put the namespace on pch.cpp but it don't work
on Feb 28 `18
dudedude1234
Because the problem is elsewhere. Show your cpp file where you init d3d
on Mar 03 `18
maxiorek82
Sign in to answer!