summaryrefslogtreecommitdiff
path: root/lib/widgets.cc
diff options
context:
space:
mode:
authorpixel <pixel>2004-06-20 23:51:59 +0000
committerpixel <pixel>2004-06-20 23:51:59 +0000
commitbf452e7f6a3fa0e41964fc8e2c57e1e577cd1682 (patch)
treeda2c9b920514d4f7b853cf92ee4050720261dde6 /lib/widgets.cc
parentb009a6451b7560ba1e0064303deede287c381963 (diff)
Put some modifications in the overall. Font to texture doesn't work though.
Diffstat (limited to 'lib/widgets.cc')
-rw-r--r--lib/widgets.cc9
1 files changed, 5 insertions, 4 deletions
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) {