From 26682d0102597fa81365d7d4ab5b64f502044dc4 Mon Sep 17 00:00:00 2001 From: hybrid Date: Thu, 19 Jun 2008 13:09:57 +0000 Subject: [PATCH] Fixed warning in software driver. git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1388 dfc29bdd-3216-0410-991c-e03cc46cb475 --- source/Irrlicht/CDMFLoader.cpp | 2 +- source/Irrlicht/CSoftwareDriver.cpp | 16 +++------------- source/Irrlicht/CSoftwareDriver.h | 18 +++--------------- 3 files changed, 7 insertions(+), 29 deletions(-) diff --git a/source/Irrlicht/CDMFLoader.cpp b/source/Irrlicht/CDMFLoader.cpp index a8d907ef..8cfc4467 100644 --- a/source/Irrlicht/CDMFLoader.cpp +++ b/source/Irrlicht/CDMFLoader.cpp @@ -98,7 +98,7 @@ IAnimatedMesh* CDMFLoader::createMesh(io::IReadFile* file) if (GetDMFHeader(dmfRawFile, header)) { //let's set ambient light - SceneMgr->setAmbientLight( header.dmfAmbient); + SceneMgr->setAmbientLight(header.dmfAmbient); //let's create the correct number of materials, vertices and faces dmfMaterial *materiali=new dmfMaterial[header.numMaterials]; diff --git a/source/Irrlicht/CSoftwareDriver.cpp b/source/Irrlicht/CSoftwareDriver.cpp index cfb23261..234d9989 100644 --- a/source/Irrlicht/CSoftwareDriver.cpp +++ b/source/Irrlicht/CSoftwareDriver.cpp @@ -19,8 +19,9 @@ namespace video //! constructor CSoftwareDriver::CSoftwareDriver(const core::dimension2d& windowSize, bool fullscreen, io::IFileSystem* io, video::IImagePresenter* presenter) -: CNullDriver(io, windowSize), RenderTargetTexture(0), RenderTargetSurface(0), - CurrentTriangleRenderer(0), ZBuffer(0), Texture(0), Presenter(presenter) +: CNullDriver(io, windowSize), BackBuffer(0), Presenter(presenter), + RenderTargetTexture(0), RenderTargetSurface(0), + CurrentTriangleRenderer(0), ZBuffer(0), Texture(0) { #ifdef _DEBUG setDebugName("CSoftwareDriver"); @@ -683,7 +684,6 @@ void CSoftwareDriver::drawClippedIndexedTriangleListT(const VERTEXTYPE* vertices } - //! Draws a 3d line. void CSoftwareDriver::draw3DLine(const core::vector3df& start, const core::vector3df& end, SColor color) @@ -711,22 +711,12 @@ void CSoftwareDriver::draw3DLine(const core::vector3df& start, } - //! clips a triangle against the viewing frustum void CSoftwareDriver::clipTriangle(f32* transformedPos) { } - -//! creates the clipping planes from the matrix -void CSoftwareDriver::createPlanes(const core::matrix4& mat) -{ - Frustum = scene::SViewFrustum(mat); -} - - - //! Only used by the internal engine. Used to notify the driver that //! the window was resized. void CSoftwareDriver::OnResize(const core::dimension2d& size) diff --git a/source/Irrlicht/CSoftwareDriver.h b/source/Irrlicht/CSoftwareDriver.h index a1a85096..1af61ca8 100644 --- a/source/Irrlicht/CSoftwareDriver.h +++ b/source/Irrlicht/CSoftwareDriver.h @@ -109,21 +109,12 @@ namespace video protected: - struct splane - { - core::vector3df Normal; - f32 Dist; - }; - //! sets a render target void setRenderTarget(video::CImage* image); //! sets the current Texture bool setTexture(video::ITexture* texture); - video::CImage* BackBuffer; - video::IImagePresenter* Presenter; - //! switches to a triangle renderer void switchToTriangleRenderer(ETriangleRenderer renderer); @@ -133,13 +124,13 @@ namespace video //! clips a triangle agains the viewing frustum void clipTriangle(f32* transformedPos); - //! creates the clipping planes from the view matrix - void createPlanes(const core::matrix4& mat); - template void drawClippedIndexedTriangleListT(const VERTEXTYPE* vertices, s32 vertexCount, const u16* indexList, s32 triangleCount); + video::CImage* BackBuffer; + video::IImagePresenter* Presenter; + core::array TransformedPoints; video::ITexture* RenderTargetTexture; @@ -157,11 +148,8 @@ namespace video IZBuffer* ZBuffer; video::ITexture* Texture; - scene::SViewFrustum Frustum; SMaterial Material; - - splane planes[6]; // current planes of the view frustum }; } // end namespace video