i have a very specific coding problem with my engine. i've been following a book on how to programm an engine but now i wrote down the code(not the whole code, but only the necessary parts for it to start working.). but now i have to concert something really wierd, could anybody help me? Note: that this a directx 11 game engine i'm talking about. Thanks already.
The error is: 1 IntelliSense: argument of type "const wchar_t *" is incompatible with parameter of type "const char *"
and my code is: Header file:
#ifndef ERROR_CHECKER_H
#define ERROR_CHECKER_H
#include "main.cpp"
#if defined(DEBUG) ||defined (_DEBUG)
#define _CRTDBG_MAP_ALLOC
#include <crtdbg.h>
#endif
#if defined(DEBUG) | defined(_DEBUG)
#ifndef HR
#define HR(x) \
{ \
HRESULT hr = (x); \
if (FAILED(hr)) \
{ \
DXTrace(__FILE__, (DWORD)__LINE__, hr, L#x, true);\
} \
}
#endif
#else
#ifndef HR
#define HR(x) (x)
#endif
#endif
#endif ERROR_CHECKER_H
The main.cpp file:
#include <windows.h>
#include <windowsx.h>
#include <d3d11.h>
#include <d3dx11.h>
#include <d3dx10.h>
#include <DXErr.h>
#include <xnamath.h>
#include <iostream>
#include <string>
#include <cassert>
#include <ctime>
#include <algorithm>
#include <sstream>
#include <fstream>
#include <vector>
#include "Tools.h"
#include "GameTimerClass.h"
#include "Error checker.h"
And the code where the problem is:
void Framework_App::OnResize()
{
assert(MainDevContext);
assert(MainD3DDevice);
assert(mSwapChain);
ReleaseCOM(mRenderTargetView);
ReleaseCOM(mDepthStencilView);
ReleaseCOM(mDepthStencilBuffer);
HR(mSwapChain->ResizeBuffers(1, mClientWitdh, mClientHeight, DXGI_FORMAT_R8G8B8A8_UNORM, 0));
}
}
I've build the same class to do resizes and other functions but up until this function there was no problem.
This string of the code is the problem:
HR(mSwapChain->ResizeBuffers(1, mClientWitdh, mClientHeight, DXGI_FORMAT_R8G8B8A8_UNORM, 0));