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