This commit is contained in:
Erik Persson 2013-11-28 08:33:29 +01:00
parent 2ce74e74cc
commit acd8681489
29 changed files with 96 additions and 133 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
Bin/DLL/GameLogic_x86D.exp Normal file

Binary file not shown.

BIN
Bin/DLL/GameLogic_x86D.ilk Normal file

Binary file not shown.

BIN
Bin/DLL/GameLogic_x86D.pdb Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -14,3 +14,8 @@ DynamicObject::DynamicObject(void)
DynamicObject::~DynamicObject(void)
{
}
void DynamicObject::Update()
{
//updatera objectet
}

View File

@ -1,3 +1,8 @@
//////////////////////////////////////////////////
//Created by Erik and Linda of the GameLogic team
//////////////////////////////////////////////////
#ifndef DYNAMICOBJECT_H
#define DYNAMICOBJECT_H
@ -14,6 +19,8 @@ namespace GameLogic
DynamicObject(void);
~DynamicObject(void);
void Update();
};
}

View File

@ -1,3 +1,8 @@
//////////////////////////////////////////////////
//Created by Erik and Linda of the GameLogic team
//////////////////////////////////////////////////
#ifndef GAMEMODE_H
#define GAMEMODE_H

View File

@ -1,4 +1,6 @@
// Game Logic interface
//////////////////////////////////////////////////
//Created by Erik and Linda of the GameLogic team
//////////////////////////////////////////////////
#ifndef IGAME_H
#define IGAME_H

View File

@ -1,3 +1,8 @@
//////////////////////////////////////////////////
//Created by Erik and Linda of the GameLogic team
//////////////////////////////////////////////////
#ifndef LEVEL_H
#define LEVEL_H

View File

@ -1,5 +1,6 @@
#include "Object.h"
#include "OysterMath.h"
#include "DllInterfaces\GFXAPI.h"
using namespace GameLogic;
@ -11,53 +12,26 @@ using namespace Utility::DynamicMemory;
Object::Object(void)
{
model = new Model();
model = new Oyster::Graphics::Model::Model();
model = Oyster::Graphics::API::CreateModel(L"bth.obj");
struct float4
{
float x,y,z,w;
};
float4 mesh[] =
{
{-1.0f,1.0f,0.0f,1.0f},
{1.0f,1.0f,0.0f,1.0f},
{1.0f,-1.0f,0.0f,1.0f},
};
Oyster::Graphics::Buffer::BUFFER_INIT_DESC desc;
desc.ElementSize= sizeof(float4);
desc.NumElements = 3;
desc.InitData=mesh;
desc.Type = Oyster::Graphics::Buffer::BUFFER_TYPE::VERTEX_BUFFER;
desc.Usage = Oyster::Graphics::Buffer::BUFFER_USAGE::BUFFER_USAGE_IMMUTABLE;
Oyster::Graphics::Buffer *b = new Oyster::Graphics::Buffer();
b->Init(desc);
ModelInfo* modelInfo = new ModelInfo();
modelInfo->Vertices = *b;
modelInfo->Indexed = false;
modelInfo->VertexCount = 3;
Float4x4 matrix = Float4x4::identity;
model->World = &matrix;
model->info = modelInfo;
model->Visible = true;
model->WorldMatrix *= 0.1f;
model->WorldMatrix.m44 = 1.0f;
}
Object::~Object(void)
{
SAFE_DELETE(model->info);
}
void Object::Render()
{
model->info->Vertices.Apply(0);
Oyster::Graphics::Core::deviceContext->Draw(model->info->VertexCount,0);
Oyster::Graphics::API::RenderScene(model,1);
}
void Object::Update()
{
//dummy implementation that will be overloaded if the other class implements it in a different way
}
Object::OBJECT_TYPE Object::GetType()

View File

@ -1,3 +1,8 @@
//////////////////////////////////////////////////
//Created by Erik and Linda of the GameLogic team
//////////////////////////////////////////////////
#ifndef OBJECT_H
#define OBJECT_H
@ -26,6 +31,7 @@ namespace GameLogic
};
void Render();
void Update();
OBJECT_TYPE GetType();
@ -37,7 +43,7 @@ namespace GameLogic
//rigidBody
Utility::DynamicMemory::UniquePointer<Oyster::Physics::ICustomBody> rigidBody;
Utility::DynamicMemory::UniquePointer<Oyster::Graphics::Render::Model> model;
Utility::DynamicMemory::UniquePointer<Oyster::Graphics::Model::Model> model;
};
}

View File

@ -1,3 +1,8 @@
//////////////////////////////////////////////////
//Created by Erik and Linda of the GameLogic team
//////////////////////////////////////////////////
#ifndef PLAYER_H
#define PLAYER_H

View File

@ -1,3 +1,8 @@
//////////////////////////////////////////////////
//Created by Erik and Linda of the GameLogic team
//////////////////////////////////////////////////
#ifndef REFMANAGER_H
#define REFMANAGER_H

View File

@ -1,3 +1,8 @@
//////////////////////////////////////////////////
//Created by Erik and Linda of the GameLogic team
//////////////////////////////////////////////////
#ifndef STATICOBJECT_H
#define STATICOBJECT_H

View File

@ -1,3 +1,8 @@
//////////////////////////////////////////////////
//Created by Erik and Linda of the GameLogic team
//////////////////////////////////////////////////
#ifndef WEAPON_H
#define WEAPON_H

View File

@ -149,7 +149,6 @@
<ClCompile Include="Core\Core.cpp" />
<ClCompile Include="Core\Init.cpp" />
<ClCompile Include="Core\ShaderManager.cpp" />
<ClCompile Include="DllInterfaces\GFXAPI.cpp" />
<ClCompile Include="FileLoader\ObjReader.cpp" />
<ClCompile Include="FileLoader\TextureLoader.cpp" />
@ -226,6 +225,8 @@
</FxCompile>
</ItemGroup>
<ItemGroup>
<None Include="OysterGraphics.vcxproj.filters.orig" />
<None Include="OysterGraphics.vcxproj.orig" />
<None Include="Shader\HLSL\Deffered Shaders\GatherGBuffer\GBufferHeader.hlsli" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

View File

@ -1,102 +1,40 @@
<?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="Core\ShaderManager.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Core\Init.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<<<<<<< HEAD
<ClCompile Include="Resources\Resources.cpp">
=======
<ClCompile Include="Render\Rendering\BasicRender.cpp">
>>>>>>> origin/Graphics
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Render\Preparations\BasicPreparations.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<<<<<<< HEAD
<ClCompile Include="Render\Rendering\BasicRender.cpp">
=======
<ClCompile Include="Render\Resources\Resources.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="FileLoader\ObjReader.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="FileLoader\TextureLoader.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="DllInterfaces\GFXAPI.cpp">
>>>>>>> origin/Graphics
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Core\Core.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Render\Preparations\Preparations.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Render\Rendering\Render.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Model\ModelInfo.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Model\Model.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Render\Resources\Resources.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Definitions\GraphicalDefinition.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="FileLoader\ObjReader.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="FileLoader\TextureLoader.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Core\Dx11Includes.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="DllInterfaces\GFXAPI.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<FxCompile Include="Shader\HLSL\SimpleDebug\DebugVertex.hlsl" />
<FxCompile Include="Shader\HLSL\SimpleDebug\DebugPixel.hlsl" />
<FxCompile Include="Shader\HLSL\SimpleDebug\DebugCameraVertex.hlsl" />
<FxCompile Include="Shader\HLSL\Deffered Shaders\GatherGBuffer\PixelGatherData.hlsl" />
<FxCompile Include="Shader\HLSL\Deffered Shaders\GatherGBuffer\VertexGatherData.hlsl" />
<FxCompile Include="Shader\HLSL\SimpleDebug\DebugCameraVertex.hlsl" />
<FxCompile Include="Shader\HLSL\SimpleDebug\DebugPixel.hlsl" />
<FxCompile Include="Shader\HLSL\SimpleDebug\DebugVertex.hlsl" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="Core\Buffer.cpp" />
<ClCompile Include="Core\Core.cpp" />
<ClCompile Include="Core\Init.cpp" />
<ClCompile Include="Core\ShaderManager.cpp" />
<ClCompile Include="DllInterfaces\GFXAPI.cpp" />
<ClCompile Include="FileLoader\ObjReader.cpp" />
<ClCompile Include="FileLoader\TextureLoader.cpp" />
<ClCompile Include="Render\Preparations\BasicPreparations.cpp" />
<ClCompile Include="Render\Rendering\BasicRender.cpp" />
<ClCompile Include="Render\Resources\Resources.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="Core\Core.h" />
<ClInclude Include="Core\Dx11Includes.h" />
<ClInclude Include="DllInterfaces\GFXAPI.h" />
<ClInclude Include="FileLoader\ObjReader.h" />
<ClInclude Include="FileLoader\TextureLoader.h" />
<ClInclude Include="Model\Model.h" />
<ClInclude Include="Model\ModelInfo.h" />
<ClInclude Include="Render\Preparations\Preparations.h" />
<ClInclude Include="Render\Rendering\Render.h" />
<ClInclude Include="Definitions\GraphicalDefinition.h" />
<ClInclude Include="Render\Resources\Resources.h" />
</ItemGroup>
<ItemGroup>
<None Include="Shader\HLSL\Deffered Shaders\GatherGBuffer\GBufferHeader.hlsli" />
<None Include="OysterGraphics.vcxproj.filters.orig" />
<None Include="OysterGraphics.vcxproj.orig" />
</ItemGroup>
</Project>