From bf452e7f6a3fa0e41964fc8e2c57e1e577cd1682 Mon Sep 17 00:00:00 2001 From: pixel Date: Sun, 20 Jun 2004 23:51:59 +0000 Subject: Put some modifications in the overall. Font to texture doesn't work though. --- lib/widgets.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lib/widgets.cc') diff --git a/lib/widgets.cc b/lib/widgets.cc index 1f540f2..91e5904 100644 --- a/lib/widgets.cc +++ b/lib/widgets.cc @@ -113,10 +113,11 @@ mogltk::shape * mogltk::widget::Shaper() { } void mogltk::widget::fulldraw() { - bool was2D; + bool was2D = true; - if (!(was2D = mogltk::engine::glbase_o->is2D())) - mogltk::engine::glbase_o->Enter2DMode(); + if (mogltk::engine::glbase_o) + if (!(was2D = mogltk::engine::glbase_o->is2D())) + mogltk::engine::glbase_o->Enter2DMode(); texture::Unbind(); mogltk::ColorP::Max = WHITE; @@ -165,7 +166,7 @@ void mogltk::Root::draw() { if (dr) dr->draw(this); else - Shaper()->box(GetAX(), GetAY(), GetAX2(), GetAY2()); + Shaper()->box(GetAX(), GetAY(), GetAX2(), GetAY2()); } void mogltk::Root::setdrawer(drawer * _dr) { -- cgit v1.2.3