From ab0b9a925a4326271727ef9db36a2fb87a4eaf18 Mon Sep 17 00:00:00 2001 From: lanariel Date: Fri, 17 Jan 2014 09:05:18 +0100 Subject: [PATCH] /Graphics Fixed stable pipeline with no warnings --- Code/OysterGraphics/DllInterfaces/GFXAPI.cpp | 1 + Code/Tester/MainTest.cpp | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Code/OysterGraphics/DllInterfaces/GFXAPI.cpp b/Code/OysterGraphics/DllInterfaces/GFXAPI.cpp index b38984dc..cca2786c 100644 --- a/Code/OysterGraphics/DllInterfaces/GFXAPI.cpp +++ b/Code/OysterGraphics/DllInterfaces/GFXAPI.cpp @@ -88,6 +88,7 @@ namespace Oyster Model::ModelInfo* mi = (Model::ModelInfo*)m->info; if(mi->Vertices->GetBufferPointer() == NULL) { + delete m; return NULL; } diff --git a/Code/Tester/MainTest.cpp b/Code/Tester/MainTest.cpp index af6917c8..f9ceec99 100644 --- a/Code/Tester/MainTest.cpp +++ b/Code/Tester/MainTest.cpp @@ -161,10 +161,10 @@ HRESULT InitDirect3D() m = Oyster::Graphics::API::CreateModel(L"crate2"); if(m==NULL) - m = Oyster::Graphics::API::CreateModel(L"crate"); - m2 = Oyster::Graphics::API::CreateModel(L"crate"); + m = Oyster::Graphics::API::CreateModel(L"christmastree"); + m2 = Oyster::Graphics::API::CreateModel(L"christmastree"); m2->WorldMatrix = Oyster::Math3D::OrientationMatrix(Oyster::Math::Float3::null,Oyster::Math::Float3(0,5,0),Oyster::Math::Float3::null); - m3 = Oyster::Graphics::API::CreateModel(L"crate"); + m3 = Oyster::Graphics::API::CreateModel(L"christmastree"); m3->WorldMatrix = Oyster::Math3D::OrientationMatrix(Oyster::Math::Float3::null,Oyster::Math::Float3(0,5,0),Oyster::Math::Float3::null);