- enable the depth buffer
- support vid_scalefactor
This commit is contained in:
parent
48d2d423f6
commit
d724b623d1
5 changed files with 65 additions and 4 deletions
|
|
@ -105,6 +105,7 @@ void PolyFrameBuffer::CheckCanvas()
|
|||
mCanvas.reset(new DCanvas(0, 0, true));
|
||||
mCanvas->Resize(GetWidth(), GetHeight(), false);
|
||||
|
||||
PolyTriangleDrawer::ResizeBuffers(mCanvas.get());
|
||||
PolyTriangleDrawer::SetViewport(GetDrawCommands(), 0, 0, mCanvas->GetWidth(), mCanvas->GetHeight(), mCanvas.get());
|
||||
}
|
||||
}
|
||||
|
|
@ -141,7 +142,7 @@ void PolyFrameBuffer::Update()
|
|||
DrawerThreads::WaitForWorkers();
|
||||
mFrameMemory.Clear();
|
||||
|
||||
if (mCanvas && GetClientWidth() == mCanvas->GetWidth() && GetClientHeight() == mCanvas->GetHeight())
|
||||
if (mCanvas)
|
||||
{
|
||||
I_PresentPolyImage(mCanvas->GetWidth(), mCanvas->GetHeight(), mCanvas->GetPixels());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ bool PolyRenderState::SetDepthClamp(bool on)
|
|||
|
||||
void PolyRenderState::SetDepthMask(bool on)
|
||||
{
|
||||
args.SetWriteDepth(on);
|
||||
}
|
||||
|
||||
void PolyRenderState::SetDepthFunc(int func)
|
||||
|
|
@ -94,6 +95,12 @@ void PolyRenderState::EnableClipDistance(int num, bool state)
|
|||
|
||||
void PolyRenderState::Clear(int targets)
|
||||
{
|
||||
//if (targets & CT_Color)
|
||||
// PolyTriangleDrawer::ClearColor(GetPolyFrameBuffer()->GetDrawCommands());
|
||||
if (targets & CT_Depth)
|
||||
PolyTriangleDrawer::ClearDepth(GetPolyFrameBuffer()->GetDrawCommands(), 0.0f);
|
||||
if (targets & CT_Stencil)
|
||||
PolyTriangleDrawer::ClearStencil(GetPolyFrameBuffer()->GetDrawCommands(), 0);
|
||||
}
|
||||
|
||||
void PolyRenderState::EnableStencil(bool on)
|
||||
|
|
@ -110,6 +117,7 @@ void PolyRenderState::SetViewport(int x, int y, int w, int h)
|
|||
|
||||
void PolyRenderState::EnableDepthTest(bool on)
|
||||
{
|
||||
args.SetDepthTest(on);
|
||||
}
|
||||
|
||||
void PolyRenderState::EnableMultisampling(bool on)
|
||||
|
|
@ -129,9 +137,7 @@ void PolyRenderState::Apply()
|
|||
drawcalls.Clock();
|
||||
|
||||
args.SetStencilTest(false);
|
||||
args.SetDepthTest(false);
|
||||
args.SetWriteStencil(false);
|
||||
args.SetWriteDepth(false);
|
||||
args.SetNoColormap();
|
||||
|
||||
args.SetColor(MAKEARGB(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue