update assimp lib

This commit is contained in:
marauder2k7 2024-12-09 20:22:47 +00:00
parent 03a348deb7
commit d3f8fee74e
1725 changed files with 196314 additions and 62009 deletions

View file

@ -13,6 +13,8 @@
// Written by IAS. :)
// ---------------------------------------------------------------------------
#include <assimp/types.h>
#include <Windows.h>
#include <shellapi.h>
#include <stdexcept>
@ -21,8 +23,9 @@
#include <dxgi1_2.h>
#include <DirectXMath.h>
#include <d3dcompiler.h>
#include <utf8.h>
#include "ModelLoader.h"
#include "UTFConverter.h"
#include "SafeRelease.hpp"
#ifdef _MSC_VER
@ -33,7 +36,6 @@
#endif // _MSC_VER
using namespace DirectX;
using namespace AssimpSamples::SharedCode;
#define VERTEX_SHADER_FILE L"VertexShader.hlsl"
#define PIXEL_SHADER_FILE L"PixelShader.hlsl"
@ -50,10 +52,10 @@ struct ConstantBuffer {
// ------------------------------------------------------------
// Window Variables
// ------------------------------------------------------------
#define SCREEN_WIDTH 800
#define SCREEN_HEIGHT 600
static constexpr uint32_t SCREEN_WIDTH = 800;
static constexpr uint32_t SCREEN_HEIGHT = 600;
const char g_szClassName[] = "directxWindowClass";
constexpr char g_szClassName[] = "directxWindowClass";
static std::string g_ModelPath;
@ -154,8 +156,14 @@ int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/,
}
// Retrieve the model file path.
g_ModelPath = UTFConverter(argv[1]).str();
std::wstring filename(argv[1]);
char *targetStart = new char[filename.size()+1];
memset(targetStart, '\0', filename.size() + 1);
utf8::utf16to8(filename.c_str(), filename.c_str() + filename.size(), targetStart);
g_ModelPath = targetStart;
delete[] targetStart;
free_command_line_allocated_memory();
WNDCLASSEX wc;
@ -511,9 +519,9 @@ void InitPipeline()
{
ID3DBlob *VS, *PS;
if(FAILED(CompileShaderFromFile(SHADER_PATH VERTEX_SHADER_FILE, 0, "main", "vs_4_0", &VS)))
Throwanerror(UTFConverter(L"Failed to compile shader from file " VERTEX_SHADER_FILE).c_str());
Throwanerror("Failed to compile shader from file");
if(FAILED(CompileShaderFromFile(SHADER_PATH PIXEL_SHADER_FILE, 0, "main", "ps_4_0", &PS)))
Throwanerror(UTFConverter(L"Failed to compile shader from file " PIXEL_SHADER_FILE).c_str());
Throwanerror("Failed to compile shader from file ");
dev->CreateVertexShader(VS->GetBufferPointer(), VS->GetBufferSize(), nullptr, &pVS);
dev->CreatePixelShader(PS->GetBufferPointer(), PS->GetBufferSize(), nullptr, &pPS);