Skip to content

Commit 1350f47

Browse files
committed
enabled antialiasing. GL bug persists on MacOS
1 parent a42b204 commit 1350f47

File tree

3 files changed

+9
-14
lines changed

3 files changed

+9
-14
lines changed

libstage/blockgroup.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,17 +113,17 @@ void BlockGroup::CalcSize()
113113

114114
void BlockGroup::Map(unsigned int layer)
115115
{
116-
static size_t count = 0;
117-
printf( "BlockGroup::Map %lu (%lu)\n", ++count, blocks.size() );
116+
//static size_t count = 0;
117+
//printf( "BlockGroup::Map %lu (%lu)\n", ++count, blocks.size() );
118118

119119
FOR_EACH (it, blocks)
120120
it->Map(layer);
121121
}
122122

123123
void BlockGroup::UnMap(unsigned int layer)
124124
{
125-
static size_t count = 0;
126-
printf( "BlockGroup::UnMap %lu (%lu)\n", ++count, blocks.size() );
125+
//static size_t count = 0;
126+
//printf( "BlockGroup::UnMap %lu (%lu)\n", ++count, blocks.size() );
127127

128128
FOR_EACH (it, blocks)
129129
it->UnMap(layer);

libstage/canvas.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ Canvas::Canvas(WorldGui *world, int x, int y, int width, int height)
8282
// configuring GL
8383
// but that line causes a segfault in Linux/X11! TODO: test in OS X
8484

85+
mode( FL_RGB|FL_DOUBLE|FL_DEPTH|FL_MULTISAMPLE );
86+
8587
perspective_camera.setPose(0.0, -4.0, 3.0);
8688
current_camera = &camera;
8789
setDirtyBuffer();
@@ -691,11 +693,11 @@ void Canvas::DrawBoundingBoxes()
691693
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
692694
glLineWidth(2.0);
693695
glPointSize(5.0);
694-
glDisable(GL_CULL_FACE);
696+
//glDisable(GL_CULL_FACE);
695697

696698
world->DrawBoundingBoxTree();
697699

698-
glEnable(GL_CULL_FACE);
700+
//glEnable(GL_CULL_FACE);
699701
glLineWidth(1.0);
700702
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
701703
}

libstage/model.cc

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -379,13 +379,8 @@ void Model::LoadBlock(Worldfile *wf, int entity)
379379

380380
void Model::AddBlockRect(meters_t x, meters_t y, meters_t dx, meters_t dy, meters_t dz)
381381
{
382-
static size_t count=0;
383-
printf( "abr %lu\n", ++count );
384-
385-
puts( "unmap start" );
386382
UnMap();
387-
puts( "unmap done" );
388-
383+
389384
std::vector<point_t> pts(4);
390385
pts[0].x = x;
391386
pts[0].y = y;
@@ -398,9 +393,7 @@ void Model::AddBlockRect(meters_t x, meters_t y, meters_t dx, meters_t dy, meter
398393

399394
blockgroup.AppendBlock(Block(&blockgroup, pts, Bounds(0, dz)));
400395

401-
puts( "map start" );
402396
Map();
403-
puts( "map done\n" );
404397
}
405398

406399
// convert a global pose into the model's local coordinate system

0 commit comments

Comments
 (0)