diff --git a/source/Irrlicht/CD3D9Driver.cpp b/source/Irrlicht/CD3D9Driver.cpp index 034d7286..1b93d378 100644 --- a/source/Irrlicht/CD3D9Driver.cpp +++ b/source/Irrlicht/CD3D9Driver.cpp @@ -818,7 +818,7 @@ bool CD3D9Driver::setRenderTargetEx(IRenderTarget* target, u16 clearFlag, SColor // Set other settings. - CurrentRendertargetSize = renderTarget->getSize(); + CurrentRenderTargetSize = renderTarget->getSize(); Transformation3DChanged = true; } else if (CurrentRenderTarget != target) @@ -861,7 +861,7 @@ bool CD3D9Driver::setRenderTargetEx(IRenderTarget* target, u16 clearFlag, SColor // Set other settings. - CurrentRendertargetSize = core::dimension2d(0, 0); + CurrentRenderTargetSize = core::dimension2d(0, 0); Transformation3DChanged = true; } @@ -1404,7 +1404,7 @@ void CD3D9Driver::draw2D3DVertexPrimitiveList(const void* vertices, pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_LINESTRIP, 0, vertexCount, primitiveCount - 1, indexList, indexType, vertices, stride); - u16 tmpIndices[] = {primitiveCount - 1, 0}; + u16 tmpIndices[] = {static_cast(primitiveCount - 1), 0}; pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_LINELIST, 0, vertexCount, 1, tmpIndices, indexType, vertices, stride); @@ -3333,16 +3333,6 @@ D3DFORMAT CD3D9Driver::getD3DColorFormat() const } -// returns the current size of the screen or rendertarget -const core::dimension2d& CD3D9Driver::getCurrentRenderTargetSize() const -{ - if ( CurrentRendertargetSize.Width == 0 ) - return ScreenSize; - else - return CurrentRendertargetSize; -} - - // Set/unset a clipping plane. bool CD3D9Driver::setClipPlane(u32 index, const core::plane3df& plane, bool enable) { diff --git a/source/Irrlicht/CD3D9Driver.h b/source/Irrlicht/CD3D9Driver.h index d31e4bfc..675442bf 100644 --- a/source/Irrlicht/CD3D9Driver.h +++ b/source/Irrlicht/CD3D9Driver.h @@ -347,9 +347,6 @@ namespace video virtual ITexture* createDeviceDependentTextureCubemap(const io::path& name, const core::array& image) _IRR_OVERRIDE_; - //! returns the current size of the screen or rendertarget - virtual const core::dimension2d& getCurrentRenderTargetSize() const _IRR_OVERRIDE_; - //! Adds a new material renderer to the VideoDriver, using pixel and/or //! vertex shaders to render geometry. s32 addShaderMaterial(const c8* vertexShaderProgram, const c8* pixelShaderProgram, @@ -415,7 +412,6 @@ namespace video IDirect3DSurface9* BackBufferSurface; IDirect3DSurface9* DepthStencilSurface; - core::dimension2d CurrentRendertargetSize; core::array ActiveRenderTarget; HWND WindowId; diff --git a/source/Irrlicht/CNullDriver.cpp b/source/Irrlicht/CNullDriver.cpp index d22bb959..fc6ba9ee 100644 --- a/source/Irrlicht/CNullDriver.cpp +++ b/source/Irrlicht/CNullDriver.cpp @@ -972,11 +972,12 @@ IRenderTarget* CNullDriver::getCurrentRenderTarget() const } -//! returns the current render target size, -//! or the screen size if render targets are not implemented const core::dimension2d& CNullDriver::getCurrentRenderTargetSize() const { - return ScreenSize; + if (CurrentRenderTargetSize.Width == 0) + return ScreenSize; + else + return CurrentRenderTargetSize; } diff --git a/source/Irrlicht/COpenGLDriver.cpp b/source/Irrlicht/COpenGLDriver.cpp index 9b16857b..6c826701 100644 --- a/source/Irrlicht/COpenGLDriver.cpp +++ b/source/Irrlicht/COpenGLDriver.cpp @@ -3759,15 +3759,6 @@ bool COpenGLDriver::setRenderTargetEx(IRenderTarget* target, u16 clearFlag, SCol } -// returns the current size of the screen or rendertarget -const core::dimension2d& COpenGLDriver::getCurrentRenderTargetSize() const -{ - if (CurrentRenderTargetSize.Width == 0) - return ScreenSize; - else - return CurrentRenderTargetSize; -} - void COpenGLDriver::clearBuffers(u16 flag, SColor color, f32 depth, u8 stencil) { GLbitfield mask = 0; diff --git a/source/Irrlicht/COpenGLDriver.h b/source/Irrlicht/COpenGLDriver.h index bbd0e372..302028ff 100644 --- a/source/Irrlicht/COpenGLDriver.h +++ b/source/Irrlicht/COpenGLDriver.h @@ -421,9 +421,6 @@ namespace video //! sets the needed renderstates void setRenderStates2DMode(bool alpha, bool texture, bool alphaChannel); - // returns the current size of the screen or rendertarget - virtual const core::dimension2d& getCurrentRenderTargetSize() const _IRR_OVERRIDE_; - void createMaterialRenderers(); //! Assign a hardware light to the specified requested light, if any