Commit 01fea019 authored by hybrid's avatar hybrid

Pitch fix for d3d RTTs by alc.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@725 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 4e5d7f4d
...@@ -607,13 +607,16 @@ void CD3D8Texture::createRenderTarget() ...@@ -607,13 +607,16 @@ void CD3D8Texture::createRenderTarget()
case D3DFMT_X1R5G5B5: case D3DFMT_X1R5G5B5:
case D3DFMT_A1R5G5B5: case D3DFMT_A1R5G5B5:
ColorFormat = ECF_A1R5G5B5; ColorFormat = ECF_A1R5G5B5;
Pitch = TextureSize.Width * 2;
break; break;
case D3DFMT_A8R8G8B8: case D3DFMT_A8R8G8B8:
case D3DFMT_X8R8G8B8: case D3DFMT_X8R8G8B8:
ColorFormat = ECF_A8R8G8B8; ColorFormat = ECF_A8R8G8B8;
Pitch = TextureSize.Width * 4;
break; break;
case D3DFMT_R5G6B5: case D3DFMT_R5G6B5:
ColorFormat = ECF_R5G6B5; ColorFormat = ECF_R5G6B5;
Pitch = TextureSize.Width * 2;
break; break;
default: default:
ColorFormat = (ECOLOR_FORMAT)-1; ColorFormat = (ECOLOR_FORMAT)-1;
......
...@@ -146,14 +146,17 @@ void CD3D9Texture::createRenderTarget() ...@@ -146,14 +146,17 @@ void CD3D9Texture::createRenderTarget()
case D3DFMT_X1R5G5B5: case D3DFMT_X1R5G5B5:
case D3DFMT_A1R5G5B5: case D3DFMT_A1R5G5B5:
ColorFormat = ECF_A1R5G5B5; ColorFormat = ECF_A1R5G5B5;
Pitch = TextureSize.Width * 2;
break; break;
case D3DFMT_A8B8G8R8: case D3DFMT_A8B8G8R8:
case D3DFMT_A8R8G8B8: case D3DFMT_A8R8G8B8:
case D3DFMT_X8R8G8B8: case D3DFMT_X8R8G8B8:
ColorFormat = ECF_A8R8G8B8; ColorFormat = ECF_A8R8G8B8;
Pitch = TextureSize.Width * 4;
break; break;
case D3DFMT_R5G6B5: case D3DFMT_R5G6B5:
ColorFormat = ECF_R5G6B5; ColorFormat = ECF_R5G6B5;
Pitch = TextureSize.Width * 2;
break; break;
default: default:
ColorFormat = (ECOLOR_FORMAT)-1; ColorFormat = (ECOLOR_FORMAT)-1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment