mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 23:32:02 +00:00
Fix render to texture
This commit is contained in:
parent
2e7c512891
commit
91d180bec6
1 changed files with 14 additions and 7 deletions
|
@ -67,14 +67,21 @@ void RenderPolyScene::ClearBuffers()
|
||||||
|
|
||||||
void RenderPolyScene::SetSceneViewport()
|
void RenderPolyScene::SetSceneViewport()
|
||||||
{
|
{
|
||||||
int height;
|
if (RenderTarget == screen) // Rendering to screen
|
||||||
if (screenblocks >= 10)
|
{
|
||||||
height = SCREENHEIGHT;
|
int height;
|
||||||
else
|
if (screenblocks >= 10)
|
||||||
height = (screenblocks*SCREENHEIGHT / 10) & ~7;
|
height = SCREENHEIGHT;
|
||||||
|
else
|
||||||
|
height = (screenblocks*SCREENHEIGHT / 10) & ~7;
|
||||||
|
|
||||||
int bottom = SCREENHEIGHT - (height + viewwindowy - ((height - viewheight) / 2));
|
int bottom = SCREENHEIGHT - (height + viewwindowy - ((height - viewheight) / 2));
|
||||||
PolyTriangleDrawer::set_viewport(viewwindowx, SCREENHEIGHT - bottom - height, viewwidth, height, RenderTarget);
|
PolyTriangleDrawer::set_viewport(viewwindowx, SCREENHEIGHT - bottom - height, viewwidth, height, RenderTarget);
|
||||||
|
}
|
||||||
|
else // Rendering to camera texture
|
||||||
|
{
|
||||||
|
PolyTriangleDrawer::set_viewport(0, 0, RenderTarget->GetWidth(), RenderTarget->GetHeight(), RenderTarget);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void RenderPolyScene::SetupPerspectiveMatrix()
|
void RenderPolyScene::SetupPerspectiveMatrix()
|
||||||
|
|
Loading…
Reference in a new issue