diff options
-rw-r--r-- | src/client/chat.cc | 4 | ||||
-rw-r--r-- | src/client/console.cc | 5 | ||||
-rw-r--r-- | src/client/view.cc | 8 |
3 files changed, 5 insertions, 12 deletions
diff --git a/src/client/chat.cc b/src/client/chat.cc index 8de2665..fc0ce1b 100644 --- a/src/client/chat.cc +++ b/src/client/chat.cc @@ -72,9 +72,8 @@ void draw() if (console::visible() || !visible()) return; - + // draw the console input - gl::enable(GL_TEXTURE_2D); gl::color(1.0f, 1.0f, 1.0f, 1.0f); draw_text(CHARWIDTH , 4 + CHARHEIGHT * (MAXNOTIFYLINES+1), "say"); gl::color(0.0f, 1.0f, .0f, 1.0f); @@ -88,7 +87,6 @@ void draw() std::string cursor("_"); draw_text(CHARWIDTH*(input_pos+6), 4 + CHARHEIGHT * (MAXNOTIFYLINES+1) , cursor); } - gl::disable(GL_TEXTURE_2D); } void toggle() diff --git a/src/client/console.cc b/src/client/console.cc index 04f896f..28d80f0 100644 --- a/src/client/console.cc +++ b/src/client/console.cc @@ -122,10 +122,7 @@ void draw() float con_height = 0.70f; - glBindTexture(GL_TEXTURE_2D, render::textures[1]); // bitmaps/conchars.tga - // draw version below the bottom of the console - gl::enable(GL_TEXTURE_2D); gl::color(0.0f, 1.0f, 0.0f, 0.5f); std::string version(core::name()); version += ' '; @@ -180,7 +177,7 @@ void draw() std::string cursor("_"); draw_text(CHARWIDTH*(input_pos+1), video::height*con_height - CHARHEIGHT - 4 , cursor); } - gl::disable(GL_TEXTURE_2D); + } void flush() diff --git a/src/client/view.cc b/src/client/view.cc index 4180b1e..522526e 100644 --- a/src/client/view.cc +++ b/src/client/view.cc @@ -126,8 +126,6 @@ void draw_status() if (console::visible()) return; - glBindTexture(GL_TEXTURE_2D, render::textures[1]); // bitmaps/conchars.tga - // print the status in the upper left corner gl::color(1.0f, 1.0f, 1.0f, 1.0f); std::stringstream status; @@ -286,11 +284,11 @@ void frame(float seconds) draw_loader(); } - // draw the console + // draw text elements + glBindTexture(GL_TEXTURE_2D, render::textures[1]); // bitmaps/conchars.tga + console::draw(); chat::draw(); - - // draw the status line draw_status(); // draw the mouse cursor |