Browse Source

gpu: get rid of the glClearColor, glClearDepth and glClear calls in all

projects, we now use Video::SetClearColor, Video::SetClearDepth and
Video::Clear instead, so that the Direct3D equivalents can be called.
master
Sam Hocevar 12 years ago
parent
commit
c588be3877
1 changed files with 5 additions and 4 deletions
  1. +5
    -4
      neercs/video/render.cpp

+ 5
- 4
neercs/video/render.cpp View File

@@ -818,10 +818,11 @@ void Render::Draw2D()

/* Clear the back buffer */
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_COLOR,GL_DST_ALPHA);
glClearColor(screen_color.r, screen_color.g, screen_color.b, 1.0f);
glClearDepth(1.0f); // set depth buffer
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glBlendFunc(GL_SRC_COLOR, GL_DST_ALPHA);

Video::SetClearColor(vec4(screen_color, 1.f));
Video::SetClearDepth(1.0f); // set depth buffer
Video::Clear(ClearMask::Color | ClearMask::Depth);

text_render->Blit(border, canvas_size);



Loading…
Cancel
Save