Merge branch 'Graphics' of https://github.com/dean11/Danbias into Graphics

Conflicts:
	Code/OysterGraphics/OysterGraphics.vcxproj
	Debug/Tester.ilk
	Debug/Tester.pdb
	OysterGraphics/Core/ShaderManager.cpp
	OysterGraphics/OysterGraphics.vcxproj.filters
	Tester/Debug/CL.read.1.tlog
	Tester/Debug/CL.write.1.tlog
	Tester/Debug/cl.command.1.tlog
	Tester/Debug/link.command.1.tlog
	Tester/Debug/link.read.1.tlog
	Tester/Debug/link.write.1.tlog
	Tester/Tester.vcxproj
This commit is contained in:
lanariel 2013-11-20 10:35:00 +01:00
commit 3512121f52
6 changed files with 684 additions and 270 deletions

View File

@ -6,7 +6,7 @@
// http://lolengine.net/blog/2011/3/4/fuck-you-microsoft-near-far-macros // http://lolengine.net/blog/2011/3/4/fuck-you-microsoft-near-far-macros
#include <windows.h> #include <windows.h>
#include <D3D11.h> #include <D3D11.h>
#include <d3dCompiler.h> #include <d3dcompiler.h>
#pragma comment(lib, "d3d11.lib") #pragma comment(lib, "d3d11.lib")
#pragma comment(lib, "d3dcompiler.lib") #pragma comment(lib, "d3dcompiler.lib")

View File

@ -1,268 +1,122 @@
#include "ObjReader.h" #include "OBJReader.h"
#include "Utilities.h" #include <sstream>
#include "..\Core\Core.h"
#include <fstream> #include <fstream>
#include <map>
using namespace std; using namespace std;
using namespace Oyster::FileLoaders; OBJReader::OBJReader()
using namespace Oyster;
using namespace Oyster::Math;
ObjReader *ObjReader::LoadFile(std::string fileName, Oyster::Math::Float4x4 transform)
{ {
static std::map<std::string, ObjReader *> cache; _mPos = 0;
_mNormal = 0;
ObjReader *reader = NULL; _mTexel = 0;
if (cache.count(fileName))
{
reader = cache[fileName];
}
else
{
reader = new ObjReader();
reader->ParseFile(fileName, transform);
cache[fileName] = reader;
}
return reader;
} }
ObjReader::ObjReader(void) OBJReader::~OBJReader()
{ {
} }
void OBJReader::readOBJFile( wstring fileName )
ObjReader::~ObjReader(void)
{ {
fstream inStream;
string typeOfData = " ";
float vertexData;
string face1, face2, face3;
inStream.open( fileName, fstream::in );
if( inStream.is_open() )
{
while( !inStream.eof() )
{
inStream >> typeOfData;
if( typeOfData == "v" )
{
Oyster::Math::Float3 position;
inStream >> vertexData;
position.x = vertexData;
inStream >> vertexData;
position.y = vertexData;
inStream >> vertexData;
position.z = vertexData;
_mVertexCoord.push_back( position );
}
else if( typeOfData == "vt" )
{
Oyster::Math::Float2 texel;
inStream >> vertexData;
texel.x = vertexData;
inStream >> vertexData;
texel.y = 1 - vertexData;
_mVertexTexture.push_back( texel );
}
else if( typeOfData == "vn" )
{
Oyster::Math::Float3 normal;
inStream >> vertexData;
normal.x = vertexData;
inStream >> vertexData;
normal.y = vertexData;
inStream >> vertexData;
normal.z = vertexData;
_mVertexNormal.push_back( normal );
}
else if( typeOfData == "f" )
{
inStream >> face1;
stringSplit( face1 );
addToOBJarray();
inStream >> face2;
stringSplit( face2 );
addToOBJarray();
inStream >> face3;
stringSplit( face3 );
addToOBJarray();
}
}
}
inStream.close();
} }
void ObjReader::ParseFile(std::string fileName, Float4x4 transform) //Private functions
void OBJReader::stringSplit( string strToSplit )
{ {
ifstream input; char delim = '/';
input.open(fileName.c_str()); string vPos, vNormal, vTexel;
stringstream aStream(strToSplit);
getline( aStream, vPos, delim );
getline( aStream, vTexel, delim );
getline( aStream, vNormal );
if(!input.is_open()) _mPos = atoi( vPos.c_str() );
{ _mNormal = atoi( vNormal.c_str() );
return; _mTexel = atoi( vTexel.c_str() );
}
string path;
Utility::String::extractDirPath(path,fileName,'\\');
std::vector<Vertex> VertexList;
std::vector<Float3> vList;
std::vector<Float3> nList;
std::vector<Float2> uvList;
Vertex vertex1, vertex2, vertex3;
Float3 face[3];
Float3 position, normal;
Float2 uv;
string s;
while(!input.eof())
{
getline(input,s);
int offset = (int)s.find(' ');
if(offset!=-1)
{
string c = s.substr(0,offset);
if(c=="v")
{
position = readVertex(offset,s);
vList.push_back(position);
}
else if(c=="vt")
{
uv = readUV(offset,s);
uvList.push_back(uv);
}
else if(c=="vn")
{
normal = readNormal(offset,s);
nList.push_back(normal);
}
else if(c=="f")
{
readFace(offset, s, face);
vertex1.Position = vList[(int)face[0].x];
vertex1.UV = uvList[(int)face[0].y];
vertex1.Normal = nList[(int)face[0].z];
vertex2.Position = vList[(int)face[1].x];
vertex2.UV = uvList[(int)face[1].y];
vertex2.Normal = nList[(int)face[1].z];
vertex3.Position = vList[(int)face[2].x];
vertex3.UV = uvList[(int)face[2].y];
vertex3.Normal = nList[(int)face[2].z];
VertexList.push_back(vertex1);
VertexList.push_back(vertex3);
VertexList.push_back(vertex2);
}
else if(c=="mtllib")
{
this->materials = GetMaterials(path+s.substr(offset+1));
}
}
}
input.close();
this->numVertices = VertexList.size();
this->vertices = new Vertex[this->numVertices];
for(size_t i=0;i<this->numVertices;++i)
{
vertices[i].Position=Math::transformVector(Math::Float4(VertexList[i].Position,1),transform);
vertices[i].Normal=Math::transformVector(Math::Float4(VertexList[i].Normal,0),transform);
vertices[i].UV = VertexList[i].UV;
}
} }
void ObjReader::GetVertexData(Vertex **vertex,int &numVertex, std::map<std::string, ID3D11ShaderResourceView *> &Textures) void OBJReader::addToOBJarray()
{ {
numVertex=(int)this->numVertices; OBJFormat temp;
(*vertex)=this->vertices;
Textures = this->materials; temp._d3VertexCoord = _mVertexCoord.at( _mPos - 1 );
} temp._d3VertexNormal = _mVertexNormal.at( _mNormal - 1 );
temp._d3VertexTexture = _mVertexTexture.at( _mTexel - 1 );
Float3 ObjReader::extract(std::string d)
{ _myOBJ.push_back( temp );
Float3 data;
int offset=(int)d.find('/');
data.x=(float)atoi(d.substr(1,offset).c_str())-1;
int newOffset = (int)d.find('/',offset+1);
string d2=d.substr(offset+1,newOffset-offset-1);
data.y=(float)atoi(d2.c_str())-1;
offset=newOffset;
newOffset = (int)d.find('/',offset+1);
string d3=d.substr(offset+1,newOffset-offset-1);
data.z=(float)atoi(d3.c_str())-1;
return data;
}
Float3 ObjReader::readVertex(int offset,string s)
{
int newOffset = (int)s.find(' ',offset+1);
Float3 vertex;
string d = s.substr(offset,newOffset-offset);
vertex.x = (float)atof(d.c_str());
offset=newOffset;
newOffset = (int)s.find(' ',offset+1);
vertex.y = (float)atof(s.substr(offset,newOffset-offset).c_str());
offset=newOffset;
newOffset = (int)s.find(' ',offset+1);
vertex.z = (float)-atof(s.substr(offset,newOffset-offset).c_str());
return vertex;
}
Float2 ObjReader::readUV(int offset,string s)
{
int newOffset = (int)s.find(' ',offset+1);
Float2 uv;
string d = s.substr(offset,newOffset-offset);
uv.x =(float)atof(d.c_str());
offset=newOffset;
newOffset = (int)s.find(' ',offset+1);
d = s.substr(offset,newOffset-offset);
uv.y =1- (float)atof(d.c_str());
offset=newOffset;
return uv;
}
Float3 ObjReader::readNormal(int offset,string s)
{
int newOffset = (int)s.find(' ',offset+1);
Float3 vertex;
string d = s.substr(offset,newOffset-offset);
vertex.x = (float)atof(d.c_str());
offset=newOffset;
newOffset = (int)s.find(' ',offset+1);
vertex.y = (float)atof(s.substr(offset,newOffset-offset).c_str());
offset=newOffset;
newOffset = (int)s.find(' ',offset+1);
vertex.z = (float)-atof(s.substr(offset,newOffset-offset).c_str());
return vertex;
}
void ObjReader::readFace(int offset,string s, Oyster::Math::Float3 face[3])
{
int newOffset = (int)s.find(' ',offset+1);
string point1 = s.substr(offset,newOffset-offset);
offset = newOffset;
newOffset = (int)s.find(' ',offset+1);
string point2 = s.substr(offset,newOffset-offset);
offset = newOffset;
newOffset = (int)s.find(' ',offset+1);
string point3 = s.substr(offset,newOffset-offset);
face[0] = extract(point1);
face[1] = extract(point2);
face[2] = extract(point3);
}
std::map<std::string, ID3D11ShaderResourceView *> ObjReader::GetMaterials(std::string fileName)
{
ifstream input;
input.open(fileName.c_str());
std::map<std::string, ID3D11ShaderResourceView *> materials;
ID3D11ShaderResourceView *srv;
string texture;
string s;
string path;
Utility::String::extractDirPath(path,fileName,'\\');
if(!input.is_open())
return materials;
while(!input.eof())
{
getline(input,s);
int offset = (int)s.find(' ');
if(offset!=-1)
{
string c = s.substr(0,offset);
if(c=="map_Kd")
{
texture = path+s.substr(offset+1);
D3DX11CreateShaderResourceViewFromFile(Oyster::Core::Device,texture.c_str(), NULL, NULL, &srv, NULL);
materials["Diffuse"] = srv;
}
if(c=="map_G")
{
texture = path+s.substr(offset+1);
D3DX11CreateShaderResourceViewFromFile(Oyster::Core::Device,texture.c_str(), NULL, NULL, &srv, NULL);
materials["Glow"] = srv;
}
if(c=="map_Ks")
{
texture = path+s.substr(offset+1);
D3DX11CreateShaderResourceViewFromFile(Oyster::Core::Device,texture.c_str(), NULL, NULL, &srv, NULL);
materials["Specular"] = srv;
}
}
}
input.close();
return materials;
} }

View File

@ -1,42 +1,53 @@
#pragma once #ifndef OBJREADER_H
#include "..\Core\CoreIncludes.h" #define OBJREADER_H
#include "..\Math\OysterMath.h" #include "..\..\Misc\Utilities.h"
#include "..\..\OysterMath\OysterMath.h"
namespace Oyster //#include <fstream>
class OBJReader
{ {
namespace FileLoaders
{
class ObjReader
{
public: public:
struct Vertex struct OBJFormat
{ {
Oyster::Math::Float3 Position; Oyster::Math::Float3 _d3VertexCoord;
Oyster::Math::Float3 Normal; Oyster::Math::Float2 _d3VertexTexture;
Oyster::Math::Float2 UV; Oyster::Math::Float3 _d3VertexNormal;
}; };
static ObjReader *LoadFile(std::string fileName, Oyster::Math::Float4x4 transform = Oyster::Math::Float4x4::identity); struct OBJMaterialData
{
string _name;
string _mapKd;
float _kd[3];
float _ka[3];
float _tf[3];
float _ni;
ObjReader(void); OBJMaterialData()
~ObjReader(void); {
_name = " ";
void GetVertexData(Vertex **vertex,int &numVertex, std::map<std::string, ID3D11ShaderResourceView *> &textures); _mapKd = " ";
private:
Vertex *vertices;
size_t numVertices;
std::map<std::string, ID3D11ShaderResourceView *> materials;
void ParseFile(std::string fileName, Oyster::Math::Float4x4 transform = Oyster::Math::Float4x4::identity);
Oyster::Math::Float3 extract(std::string d);
Oyster::Math::Float3 readVertex(int offset,std::string s);
Oyster::Math::Float2 readUV(int offset,std::string s);
Oyster::Math::Float3 readNormal(int offset,std::string s);
void readFace(int offset,std::string s, Oyster::Math::Float3 face[3]);
std::map<std::string, ID3D11ShaderResourceView *> GetMaterials(std::string fileName);
};
} }
} };
std::vector<OBJFormat> _myOBJ;
private:
vector<Oyster::Math::Float3> _mVertexCoord, _mVertexNormal;
vector<Oyster::Math::Float2> _mVertexTexture;
int _mNrOfCoords, _mNrOfNormals, _mNrOfTexels, _mNrOfFaces;
int _mPos, _mNormal, _mTexel;
void stringSplit( string strToSplit );
void addToOBJarray();
public:
OBJReader();
~OBJReader();
void readOBJFile( wstring fileName);
};
#endif

View File

@ -0,0 +1,351 @@
#include "Core.h"
#include <fstream>
const char* ShaderFunction = "main";
namespace Oyster
{
bool LoadPrecompiled(std::wstring filename, Core::ShaderManager::ShaderType type, std::wstring name);
bool LoadCompile(std::wstring filename, Core::ShaderManager::ShaderType type, std::wstring name);
namespace
{
struct ShaderData
{
size_t size;
char* data;
};
std::vector<ID3D11PixelShader*> PS;
std::map<std::wstring,int> PSMap;
std::vector<ID3D11GeometryShader*> GS;
std::map<std::wstring,int> GSMap;
std::vector<ID3D11ComputeShader*> CS;
std::map<std::wstring,int> CSMap;
std::vector<ID3D11VertexShader*> VS;
std::vector<ShaderData> VData;
std::map<std::wstring,int> VSMap;
}
#pragma region Init
bool Core::ShaderManager::Init(std::wstring filename, ShaderType type, std::wstring name, bool Precompiled)
{
if(Precompiled)
{
return LoadPrecompiled(filename, type, name);
}
else
{
return LoadCompile(filename, type, name);
}
return true;
}
bool LoadPrecompiled(std::wstring filename, Core::ShaderManager::ShaderType type, std::wstring name)
{
std::ifstream stream;
ShaderData sd;
//Create Vertex shader and Layout
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];
stream.seekg(0, std::ios::beg);
stream.read(&sd.data[0], sd.size);
stream.close();
ID3D11VertexShader* vertex;
ID3D11GeometryShader* geometry;
ID3D11PixelShader* pixel;
ID3D11ComputeShader* compute;
switch(type)
{
case Core::ShaderManager::ShaderType::Vertex:
if(VSMap.count(name))
return false;
if(FAILED(Core::Device->CreateVertexShader(sd.data, sd.size, 0, &vertex)))
{
return false;
}
VSMap[name] = VS.size();
VS.push_back(vertex);
VData.push_back(sd);
break;
case Core::ShaderManager::ShaderType::Hull:
case Core::ShaderManager::ShaderType::Domain:
return false;
case Core::ShaderManager::ShaderType::Geometry:
if(GSMap.count(name))
return false;
if(FAILED(Core::Device->CreateGeometryShader(sd.data, sd.size, 0, &geometry)))
{
return false;
}
GSMap[name] = GS.size();
GS.push_back(geometry);
break;
case Core::ShaderManager::ShaderType::Pixel:
if(PSMap.count(name))
return false;
if(FAILED(Core::Device->CreatePixelShader(sd.data, sd.size, 0, &pixel)))
{
return false;
}
PSMap[name] = PS.size();
PS.push_back(pixel);
break;
case Core::ShaderManager::ShaderType::Compute:
if(CSMap.count(name))
return false;
if(FAILED(Core::Device->CreateComputeShader(sd.data, sd.size, 0, &compute)))
{
return false;
}
CSMap[name] = CS.size();
CS.push_back(compute);
break;
}
}
else
{
return false;
}
return true;
}
bool LoadCompile(std::wstring filename, Core::ShaderManager::ShaderType type, std::wstring name)
{
/// \todo error reporting
ID3D10Blob *Shader,*Error;
switch(type)
{
case Core::ShaderManager::ShaderType::Pixel:
ID3D11PixelShader* pixel;
if(FAILED(D3DCompileFromFile(filename.c_str(),NULL,NULL,ShaderFunction,"ps_5_0",0,0,&Shader,&Error)))
{
std::string fel = (char*)Error->GetBufferPointer();
Error->Release();
return false;
}
if(FAILED(Oyster::Core::Device->CreatePixelShader(Shader->GetBufferPointer(),Shader->GetBufferSize(),NULL,&pixel)))
{
Error->Release();
Shader->Release();
return false;
}
Shader->Release();
if(!PSMap.count(name))
{
PSMap[name] = PS.size();
PS.push_back(pixel);
}
else
{
PS[PSMap[name]] = pixel;
}
break;
case Core::ShaderManager::ShaderType::Geometry:
ID3D11GeometryShader* geometry;
if(FAILED(D3DCompileFromFile(filename.c_str(),NULL,NULL,ShaderFunction,"gs_5_0",0,0,&Shader,&Error)))
{
std::string fel = (char*)Error->GetBufferPointer();
Error->Release();
return false;
}
if(FAILED(Oyster::Core::Device->CreateGeometryShader(Shader->GetBufferPointer(),Shader->GetBufferSize(),NULL,&geometry)))
{
Error->Release();
Shader->Release();
return false;
}
Shader->Release();
if(!GSMap.count(name))
{
GSMap[name] = GS.size();
GS.push_back(geometry);
}
else
{
GS[GSMap[name]] = geometry;
}
break;
case Core::ShaderManager::ShaderType::Vertex:
ID3D11VertexShader* vertex;
if(FAILED(D3DCompileFromFile(filename.c_str(),NULL,NULL,ShaderFunction,"vs_5_0",0,0,&Shader,&Error)))
{
std::string fel = (char*)Error->GetBufferPointer();
Error->Release();
return false;
}
if(FAILED(Oyster::Core::Device->CreateVertexShader(Shader->GetBufferPointer(),Shader->GetBufferSize(),NULL,&vertex)))
{
Error->Release();
Shader->Release();
return false;
}
if(!VSMap.count(name))
{
VSMap[name] = VS.size();
VS.push_back(vertex);
ShaderData sd;
sd.size = Shader->GetBufferSize();
sd.data = new char[sd.size];
memcpy(sd.data,Shader->GetBufferPointer(),sd.size);
VData.push_back(sd);
}
else
{
VS[VSMap[name]] = vertex;
delete[] VData[VSMap[name]].data;
VData[VSMap[name]].size = Shader->GetBufferSize();
VData[VSMap[name]].data = new char[VData[VSMap[name]].size];
memcpy(VData[VSMap[name]].data,Shader->GetBufferPointer(),VData[VSMap[name]].size);
}
Shader->Release();
break;
}
return true;
}
#pragma endregion
void Core::ShaderManager::CreateInputLayout(const D3D11_INPUT_ELEMENT_DESC *desc, int ElementCount,int VertexIndex,ID3D11InputLayout *&Layout)
{
if(VertexIndex==-1)
{
Layout=0;
return;
}
Device->CreateInputLayout(desc,ElementCount,VData[VertexIndex].data,VData[VertexIndex].size,&Layout);
}
#pragma region Get
int Core::ShaderManager::Get::Pixel(std::wstring Name)
{
if(PSMap.count(Name))
return PSMap[Name];
return -1;
}
int Core::ShaderManager::Get::Vertex(std::wstring Name)
{
if(VSMap.count(Name))
return VSMap[Name];
return -1;
}
int Core::ShaderManager::Get::Geometry(std::wstring Name)
{
if(GSMap.count(Name))
return GSMap[Name];
return -1;
}
int Core::ShaderManager::Get::Compute(std::wstring Name)
{
if(CSMap.count(Name))
return CSMap[Name];
return -1;
}
int Core::ShaderManager::Get::Hull(std::wstring Name)
{
return -1;
}
int Core::ShaderManager::Get::Domain(std::wstring Name)
{
return -1;
}
#pragma endregion
#pragma region Set
/// \todo smart set
void Core::ShaderManager::Set::Pixel(int Index)
{
if(Index==-1)
DeviceContext->PSSetShader( NULL,NULL,0);
else
DeviceContext->PSSetShader( PS[Index],NULL,0);
}
void Core::ShaderManager::Set::Vertex(int Index)
{
if(Index==-1)
DeviceContext->VSSetShader( NULL,NULL,0);
else
DeviceContext->VSSetShader( VS[Index],NULL,0);
}
void Core::ShaderManager::Set::Geometry(int Index)
{
if(Index==-1)
DeviceContext->GSSetShader( NULL,NULL,0);
else
DeviceContext->GSSetShader( GS[Index],NULL,0);
}
void Core::ShaderManager::Set::Compute(int Index)
{
if(Index==-1)
DeviceContext->CSSetShader( NULL,NULL,0);
else
DeviceContext->CSSetShader( CS[Index],NULL,0);
}
/// \todo set Hull
void Core::ShaderManager::Set::Hull(int Index)
{
return;
}
/// \todo set Domain
void Core::ShaderManager::Set::Domain(int Index)
{
return;
}
#pragma endregion
/// \todo smart Set ie. not resetting the shader
/// \todo research states
/// \todo smart buffer set
void Core::ShaderManager::SetShaderEffect(ShaderEffect se)
{
Set::Pixel(se.Shaders.Pixel);
Set::Vertex(se.Shaders.Vertex);
Set::Geometry(se.Shaders.Geometry);
Set::Compute(se.Shaders.Compute);
Oyster::Core::DeviceContext->IASetInputLayout(se.IAStage.Layout);
Oyster::Core::DeviceContext->IASetPrimitiveTopology(se.IAStage.Topology);
for(unsigned int i=0;i<se.CBuffers.Vertex.size();++i)
se.CBuffers.Vertex[i]->Apply(i);
for(unsigned int i=0;i<se.CBuffers.Geometry.size();++i)
se.CBuffers.Geometry[i]->Apply(i);
for(unsigned int i=0;i<se.CBuffers.Pixel.size();++i)
se.CBuffers.Pixel[i]->Apply(i);
Oyster::Core::DeviceContext->RSSetState(se.RenderStates.Rasterizer);
Oyster::Core::DeviceContext->PSSetSamplers(0,se.RenderStates.SampleCount,se.RenderStates.SampleState);
float test[4] = {0};
Oyster::Core::DeviceContext->OMSetBlendState(se.RenderStates.BlendState,test,-1);
}
}

View File

@ -0,0 +1,100 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="Core\Buffer.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Core\Core.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Render\Model.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Render\TextBox.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Resourses\Buffers.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Resourses\Manager.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Resourses\PipelineResources.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Resourses\ShaderEffects.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Engine.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Core\ShaderManager.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Core\Buffer.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Core\Core.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Core\CoreIncludes.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Render\Lights.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Render\Model.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Render\ModelInfo.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Render\TextBox.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Resourses\Buffers.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Resourses\GraphicsDefinitions.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Resourses\Manager.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Resourses\PipelineResources.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Resourses\ShaderEffects.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Engine.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="EngineIncludes.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="FileLoader\ObjReader.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<FxCompile Include="Shader\HLSL\SimpleDebug\DebugVertex.hlsl" />
<FxCompile Include="Shader\HLSL\SimpleDebug\DebugPixel.hlsl" />
</ItemGroup>
</Project>

98
Tester/Tester.vcxproj Normal file
View File

@ -0,0 +1,98 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{1B3BEA4C-CF75-438A-9693-60FB8444BBF3}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>Tester</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v110</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v110</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>..\OysterGraphics;..\OysterMath;..\Misc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="MainTest.cpp" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Misc\Misc.vcxproj">
<Project>{2ec4dded-8f75-4c86-a10b-e1e8eb29f3ee}</Project>
</ProjectReference>
<ProjectReference Include="..\OysterGraphics\OysterGraphics.vcxproj">
<Project>{0ec83e64-230e-48ef-b08c-6ac9651b4f82}</Project>
</ProjectReference>
<ProjectReference Include="..\OysterMath\OysterMath.vcxproj">
<Project>{f10cbc03-9809-4cba-95d8-327c287b18ee}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>