- Merged rev 5255 from trunk.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5256 dfc29bdd-3216-0410-991c-e03cc46cb475
master
nadro 2016-02-13 11:09:36 +00:00
parent cc3823e853
commit bf419bedf3
5 changed files with 7 additions and 32 deletions

View File

@ -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<u32>(0, 0);
CurrentRenderTargetSize = core::dimension2d<u32>(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<u16>(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<u32>& 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)
{

View File

@ -347,9 +347,6 @@ namespace video
virtual ITexture* createDeviceDependentTextureCubemap(const io::path& name, const core::array<IImage*>& image) _IRR_OVERRIDE_;
//! returns the current size of the screen or rendertarget
virtual const core::dimension2d<u32>& 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<u32> CurrentRendertargetSize;
core::array<bool> ActiveRenderTarget;
HWND WindowId;

View File

@ -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<u32>& CNullDriver::getCurrentRenderTargetSize() const
{
return ScreenSize;
if (CurrentRenderTargetSize.Width == 0)
return ScreenSize;
else
return CurrentRenderTargetSize;
}

View File

@ -3759,15 +3759,6 @@ bool COpenGLDriver::setRenderTargetEx(IRenderTarget* target, u16 clearFlag, SCol
}
// returns the current size of the screen or rendertarget
const core::dimension2d<u32>& 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;

View File

@ -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<u32>& getCurrentRenderTargetSize() const _IRR_OVERRIDE_;
void createMaterialRenderers();
//! Assign a hardware light to the specified requested light, if any