Release Now Stable
This commit is contained in:
parent
07a616b252
commit
f29af8b8bd
|
@ -16,7 +16,7 @@ Object::Object(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
model = new Model();
|
model = new Model();
|
||||||
model = Oyster::Graphics::API::CreateModel(L"bth.obj");
|
model = Oyster::Graphics::API::CreateModel(L"orca");
|
||||||
|
|
||||||
API::SimpleBodyDescription sbDesc;
|
API::SimpleBodyDescription sbDesc;
|
||||||
//sbDesc.centerPosition =
|
//sbDesc.centerPosition =
|
||||||
|
|
|
@ -17,7 +17,7 @@ std::wstring GetErrorMessage(int errorCode)
|
||||||
LPWSTR lpMessage;
|
LPWSTR lpMessage;
|
||||||
std::wstring retVal(L"Succesful");
|
std::wstring retVal(L"Succesful");
|
||||||
|
|
||||||
DWORD bufLen = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS ,
|
DWORD bufLen = FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS ,
|
||||||
NULL,
|
NULL,
|
||||||
errorCode ,
|
errorCode ,
|
||||||
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT) ,
|
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT) ,
|
||||||
|
|
|
@ -33,6 +33,7 @@ namespace Oyster
|
||||||
createDeviceFlags |= D3D11_CREATE_DEVICE_DEBUG;
|
createDeviceFlags |= D3D11_CREATE_DEVICE_DEBUG;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
createDeviceFlags |= D3D11_CREATE_DEVICE_DEBUG;
|
||||||
|
|
||||||
D3D_FEATURE_LEVEL featureLevelsToTry[] =
|
D3D_FEATURE_LEVEL featureLevelsToTry[] =
|
||||||
{
|
{
|
||||||
|
|
|
@ -63,7 +63,12 @@ namespace Oyster
|
||||||
{
|
{
|
||||||
Model::ModelInfo* info = (Model::ModelInfo*)model->info;
|
Model::ModelInfo* info = (Model::ModelInfo*)model->info;
|
||||||
delete model;
|
delete model;
|
||||||
info->Vertices->~Buffer();
|
SAFE_DELETE(info->Vertices);
|
||||||
|
if(info->Indexed)
|
||||||
|
{
|
||||||
|
SAFE_DELETE(info->Indecies);
|
||||||
|
}
|
||||||
|
delete info;
|
||||||
}
|
}
|
||||||
|
|
||||||
void API::Clean()
|
void API::Clean()
|
||||||
|
|
|
@ -4,13 +4,12 @@
|
||||||
#include "OysterMath.h"
|
#include "OysterMath.h"
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
|
|
||||||
#if defined GFX_DLL_EXPORT
|
#ifdef GFX_DLL_EXPORT
|
||||||
#define GFX_DLL_USAGE __declspec(dllexport)
|
#define GFX_DLL_USAGE __declspec(dllexport)
|
||||||
#else
|
#else
|
||||||
#define GFX_DLL_USAGE __declspec(dllimport)
|
#define GFX_DLL_USAGE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
namespace Oyster
|
namespace Oyster
|
||||||
{
|
{
|
||||||
namespace Graphics
|
namespace Graphics
|
||||||
|
|
|
@ -165,14 +165,16 @@ namespace Oyster
|
||||||
data.data = new char[data.size];
|
data.data = new char[data.size];
|
||||||
memcpy(data.data,Shader->GetBufferPointer(),data.size);
|
memcpy(data.data,Shader->GetBufferPointer(),data.size);
|
||||||
#else
|
#else
|
||||||
|
std::ifstream stream;
|
||||||
|
|
||||||
stream.open(filename, std::ifstream::in | std::ifstream::binary);
|
stream.open(filename, std::ifstream::in | std::ifstream::binary);
|
||||||
if(stream.good())
|
if(stream.good())
|
||||||
{
|
{
|
||||||
stream.seekg(0, std::ios::end);
|
stream.seekg(0, std::ios::end);
|
||||||
sd.size = size_t(stream.tellg());
|
data.size = size_t(stream.tellg());
|
||||||
sd.data = new char[sd.size];
|
data.data = new char[data.size];
|
||||||
stream.seekg(0, std::ios::beg);
|
stream.seekg(0, std::ios::beg);
|
||||||
stream.read(&sd.data[0], sd.size);
|
stream.read(&data.data[0], data.size);
|
||||||
stream.close();
|
stream.close();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -180,7 +182,6 @@ namespace Oyster
|
||||||
memset(&out,0,sizeof(out));
|
memset(&out,0,sizeof(out));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
out.loadedData = Core::ShaderManager::CreateShader(data, Core::ShaderManager::ShaderType(type));
|
out.loadedData = Core::ShaderManager::CreateShader(data, Core::ShaderManager::ShaderType(type));
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,6 +109,7 @@
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<FxCompile>
|
<FxCompile>
|
||||||
<ObjectFileOutput>$(SolutionDir)..\Bin\Content\Shaders\%(Filename).cso</ObjectFileOutput>
|
<ObjectFileOutput>$(SolutionDir)..\Bin\Content\Shaders\%(Filename).cso</ObjectFileOutput>
|
||||||
|
<ShaderModel>5.0</ShaderModel>
|
||||||
</FxCompile>
|
</FxCompile>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
@ -124,12 +125,13 @@
|
||||||
</Link>
|
</Link>
|
||||||
<FxCompile>
|
<FxCompile>
|
||||||
<ObjectFileOutput>$(SolutionDir)..\Bin\Content\Shaders\%(Filename).cso</ObjectFileOutput>
|
<ObjectFileOutput>$(SolutionDir)..\Bin\Content\Shaders\%(Filename).cso</ObjectFileOutput>
|
||||||
|
<ShaderModel>5.0</ShaderModel>
|
||||||
</FxCompile>
|
</FxCompile>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<Optimization>MaxSpeed</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<SDLCheck>true</SDLCheck>
|
<SDLCheck>true</SDLCheck>
|
||||||
|
@ -143,12 +145,14 @@
|
||||||
</Link>
|
</Link>
|
||||||
<FxCompile>
|
<FxCompile>
|
||||||
<ObjectFileOutput>$(SolutionDir)..\Bin\Content\Shaders\%(Filename).cso</ObjectFileOutput>
|
<ObjectFileOutput>$(SolutionDir)..\Bin\Content\Shaders\%(Filename).cso</ObjectFileOutput>
|
||||||
|
<EnableDebuggingInformation>true</EnableDebuggingInformation>
|
||||||
|
<ShaderModel>5.0</ShaderModel>
|
||||||
</FxCompile>
|
</FxCompile>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<Optimization>MaxSpeed</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<SDLCheck>true</SDLCheck>
|
<SDLCheck>true</SDLCheck>
|
||||||
|
@ -162,6 +166,8 @@
|
||||||
</Link>
|
</Link>
|
||||||
<FxCompile>
|
<FxCompile>
|
||||||
<ObjectFileOutput>$(SolutionDir)..\Bin\Content\Shaders\%(Filename).cso</ObjectFileOutput>
|
<ObjectFileOutput>$(SolutionDir)..\Bin\Content\Shaders\%(Filename).cso</ObjectFileOutput>
|
||||||
|
<EnableDebuggingInformation>true</EnableDebuggingInformation>
|
||||||
|
<ShaderModel>5.0</ShaderModel>
|
||||||
</FxCompile>
|
</FxCompile>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -60,7 +60,8 @@ namespace Oyster
|
||||||
}
|
}
|
||||||
void Basic::EndFrame()
|
void Basic::EndFrame()
|
||||||
{
|
{
|
||||||
Core::swapChain->Present(0,0);
|
IDXGISwapChain* chain = Core::swapChain;
|
||||||
|
chain->Present(0,0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
|
|
||||||
// /Bin/Executable/Tester ->
|
// /Bin/Executable/Tester ->
|
||||||
// /Code/OysterGraphics/Shader/HLSL
|
// /Code/OysterGraphics/Shader/HLSL
|
||||||
const std::wstring PathFromExeToHlsl = L"..\\..\\..\\Code\\OysterGraphics\\Shader\\HLSL\\";
|
const std::wstring PathFromExeToCso = L"..\\Content\\Shaders\\";
|
||||||
|
const std::wstring PathFromExeToHlsl = L"..\\..\\Code\\OysterGraphics\\Shader\\HLSL\\";
|
||||||
const std::wstring VertexTransformDebug = L"TransformDebugVertex";
|
const std::wstring VertexTransformDebug = L"TransformDebugVertex";
|
||||||
const std::wstring VertexDebug = L"DebugVertex";
|
const std::wstring VertexDebug = L"DebugVertex";
|
||||||
const std::wstring PixelRed = L"DebugPixel";
|
const std::wstring PixelRed = L"DebugPixel";
|
||||||
|
@ -42,6 +43,12 @@ namespace Oyster
|
||||||
|
|
||||||
#else
|
#else
|
||||||
/** Load Vertex Shader with Precompiled */
|
/** Load Vertex Shader with Precompiled */
|
||||||
|
Core::ShaderManager::Init(PathFromExeToCso + L"DebugCameraVertex.cso",ShaderType::Vertex, VertexTransformDebug);
|
||||||
|
Core::ShaderManager::Init(PathFromExeToCso + L"DebugVertex.cso",ShaderType::Vertex, VertexDebug);
|
||||||
|
|
||||||
|
/** Load Pixel Shader with Precompiled */
|
||||||
|
Core::ShaderManager::Init(PathFromExeToCso + L"DebugPixel.cso",ShaderType::Pixel, PixelRed);
|
||||||
|
Core::ShaderManager::Init(PathFromExeToCso + L"TextureDebug.cso",ShaderType::Pixel, PixelTexture);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#pragma endregion
|
#pragma endregion
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
HINSTANCE g_hInst = NULL;
|
HINSTANCE g_hInst = NULL;
|
||||||
HWND g_hWnd = NULL;
|
HWND g_hWnd = NULL;
|
||||||
Oyster::Graphics::Model::Model* m = NULL;
|
Oyster::Graphics::Model::Model* m = NULL;
|
||||||
|
Oyster::Graphics::Model::Model* m2 = NULL;
|
||||||
Oyster::Math::Float4x4 V;
|
Oyster::Math::Float4x4 V;
|
||||||
Oyster::Math::Float4x4 P;
|
Oyster::Math::Float4x4 P;
|
||||||
|
|
||||||
|
@ -186,7 +187,9 @@ HRESULT InitDirect3D()
|
||||||
#pragma endregion
|
#pragma endregion
|
||||||
|
|
||||||
#pragma region Obj
|
#pragma region Obj
|
||||||
m = Oyster::Graphics::API::CreateModel(L"orca");
|
m = Oyster::Graphics::API::CreateModel(L"crate");
|
||||||
|
m2 = Oyster::Graphics::API::CreateModel(L"crate");
|
||||||
|
m2->WorldMatrix = Oyster::Math3D::OrientationMatrix(Oyster::Math::Float3::null,Oyster::Math::Float3(0,5,0),Oyster::Math::Float3::null);
|
||||||
#pragma endregion
|
#pragma endregion
|
||||||
|
|
||||||
|
|
||||||
|
@ -203,6 +206,7 @@ HRESULT Update(float deltaTime)
|
||||||
{
|
{
|
||||||
angle += Oyster::Math::pi/30000;
|
angle += Oyster::Math::pi/30000;
|
||||||
m->WorldMatrix = Oyster::Math3D::RotationMatrix_AxisY(angle);
|
m->WorldMatrix = Oyster::Math3D::RotationMatrix_AxisY(angle);
|
||||||
|
m2->WorldMatrix = Oyster::Math3D::OrientationMatrix(Oyster::Math::Float3(0,0,1)*-angle,Oyster::Math::Float3(0,4,0),Oyster::Math::Float3::null);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -211,6 +215,7 @@ HRESULT Render(float deltaTime)
|
||||||
Oyster::Graphics::API::NewFrame(V,P);
|
Oyster::Graphics::API::NewFrame(V,P);
|
||||||
|
|
||||||
Oyster::Graphics::API::RenderScene(m,1);
|
Oyster::Graphics::API::RenderScene(m,1);
|
||||||
|
Oyster::Graphics::API::RenderScene(m2,1);
|
||||||
|
|
||||||
Oyster::Graphics::API::EndFrame();
|
Oyster::Graphics::API::EndFrame();
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,7 @@
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<LinkIncremental>false</LinkIncremental>
|
<LinkIncremental>false</LinkIncremental>
|
||||||
<IntDir>$(SolutionDir)..\Obj\$(ProjectName)\$(PlatformShortName)\$(Configuration)\</IntDir>
|
<IntDir>$(SolutionDir)..\Obj\$(ProjectName)\$(PlatformShortName)\$(Configuration)\</IntDir>
|
||||||
<OutDir>$(SolutionDir)..\Bin\Executable\$(ProjectName)\</OutDir>
|
<OutDir>$(SolutionDir)..\Bin\Executable\</OutDir>
|
||||||
<TargetName>$(ProjectName)_$(PlatformShortName)</TargetName>
|
<TargetName>$(ProjectName)_$(PlatformShortName)</TargetName>
|
||||||
<IncludePath>C:\Program Files (x86)\Visual Leak Detector\include;$(IncludePath)</IncludePath>
|
<IncludePath>C:\Program Files (x86)\Visual Leak Detector\include;$(IncludePath)</IncludePath>
|
||||||
<LibraryPath>C:\Program Files (x86)\Visual Leak Detector\lib\Win32;$(LibraryPath)</LibraryPath>
|
<LibraryPath>C:\Program Files (x86)\Visual Leak Detector\lib\Win32;$(LibraryPath)</LibraryPath>
|
||||||
|
@ -143,9 +143,9 @@
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<PrecompiledHeader>
|
<PrecompiledHeader>
|
||||||
</PrecompiledHeader>
|
</PrecompiledHeader>
|
||||||
<Optimization>MaxSpeed</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>false</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>true</SDLCheck>
|
<SDLCheck>true</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>..\OysterGraphics;..\OysterMath;..\Misc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>..\OysterGraphics;..\OysterMath;..\Misc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
@ -158,6 +158,7 @@
|
||||||
<AdditionalDependencies>OysterGraphics_$(PlatformShortName).lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>OysterGraphics_$(PlatformShortName).lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(SolutionDir)..\Bin\DLL;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(SolutionDir)..\Bin\DLL;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<PreventDllBinding>true</PreventDllBinding>
|
<PreventDllBinding>true</PreventDllBinding>
|
||||||
|
<DelayLoadDLLs>OysterGraphics_x86.dll;</DelayLoadDLLs>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
@ -165,7 +166,7 @@
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<PrecompiledHeader>
|
<PrecompiledHeader>
|
||||||
</PrecompiledHeader>
|
</PrecompiledHeader>
|
||||||
<Optimization>MaxSpeed</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
|
Loading…
Reference in New Issue