Browse Source

gpu: add SetDepthMask/GetDepthMask to render contexts.

master
Sam Hocevar 11 years ago
parent
commit
2cc06f00c2
2 changed files with 3 additions and 4 deletions
  1. +1
    -2
      neercs/term/pty.cpp
  2. +2
    -2
      neercs/video/render.cpp

+ 1
- 2
neercs/term/pty.cpp View File

@@ -178,8 +178,7 @@ size_t Pty::ReadData(char *data, size_t maxlen)
else
sent += nr;

if (sent >= 0)
return sent;
return sent;
}
}
}


+ 2
- 2
neercs/video/render.cpp View File

@@ -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);
}


Loading…
Cancel
Save