From 2cc06f00c2ca5030f1d2970b0ed30ef371eb42e1 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Fri, 2 Aug 2013 18:25:08 +0000 Subject: [PATCH] gpu: add SetDepthMask/GetDepthMask to render contexts. --- neercs/term/pty.cpp | 3 +-- neercs/video/render.cpp | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/neercs/term/pty.cpp b/neercs/term/pty.cpp index 3219295..544b162 100644 --- a/neercs/term/pty.cpp +++ b/neercs/term/pty.cpp @@ -178,8 +178,7 @@ size_t Pty::ReadData(char *data, size_t maxlen) else sent += nr; - if (sent >= 0) - return sent; + return sent; } } } diff --git a/neercs/video/render.cpp b/neercs/video/render.cpp index 4c8e8f9..fc90b9e 100644 --- a/neercs/video/render.cpp +++ b/neercs/video/render.cpp @@ -861,8 +861,6 @@ void Render::ShaderSimple(Framebuffer *fbo_output, int n) int Render::InitDrawResources(void) { - glDepthMask(GL_TRUE); // do not write z-buffer - /* initialise framebuffer objects */ fbo_back = new Framebuffer(screen_size); fbo_screen = new Framebuffer(screen_size); @@ -1479,6 +1477,7 @@ void Render::Draw3D() RenderContext rc; rc.SetBlendFunc(BlendFunc::Disabled, BlendFunc::Disabled); rc.SetDepthFunc(DepthFunc::Disabled); + rc.SetDepthMask(DepthFunc::Disabled); glEnableClientState(GL_VERTEX_ARRAY); glVertexPointer(4, GL_FLOAT, 0, fs_quad_vtx); @@ -1725,3 +1724,4 @@ Render::~Render() if (m_fps_debug) Ticker::Unref(m_fps_debug); } +