X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=src%2Fview.cpp;h=09b7f2cf7b072ce82fdee7af36d5e5bdb55f33a3;hb=c4f8f7c6c7e43fc9fd5358197ca866b4186f636c;hp=5acd860d7adfc2272902f49abe35a1a8321b6569;hpb=efdd8f483157ceeb1bae535840934ac770126a28;p=ipdf%2Fcode.git diff --git a/src/view.cpp b/src/view.cpp index 5acd860..09b7f2c 100644 --- a/src/view.cpp +++ b/src/view.cpp @@ -377,7 +377,8 @@ void View::Render(int width, int height) glPopDebugGroup(); #ifndef CONTROLPANEL_DISABLED - ControlPanel::Update(); + // The powers that be suggest that this may be causing of the segfaults. + //ControlPanel::Update(); #endif //CONTROLPANEL_DISABLED //Debug("Completed Render"); @@ -542,10 +543,10 @@ void View::UpdateObjBoundsVBO(unsigned first_obj, unsigned last_obj) obj_bounds = TransformToViewCoords(m_document.m_objects.bounds[id]); } GPUObjBounds gpu_bounds = { - (float)Float(obj_bounds.x), - (float)Float(obj_bounds.y), - (float)Float(obj_bounds.x + obj_bounds.w), - (float)Float(obj_bounds.y + obj_bounds.h) + Float(obj_bounds.x), + Float(obj_bounds.y), + Float(obj_bounds.x + obj_bounds.w), + Float(obj_bounds.y + obj_bounds.h) }; obj_bounds_builder.Add(gpu_bounds); @@ -572,19 +573,19 @@ void View::UpdateObjBoundsVBO(unsigned first_obj, unsigned last_obj) if (!m_use_gpu_transform) obj_bounds = TransformToViewCoords(obj_bounds); GPUObjBounds gpu_bounds = { - Float(obj_bounds.x), - Float(obj_bounds.y), - Float(obj_bounds.x + obj_bounds.w), - Float(obj_bounds.y + obj_bounds.h) + ClampFloat(obj_bounds.x), + ClampFloat(obj_bounds.y), + ClampFloat(obj_bounds.x + obj_bounds.w), + ClampFloat(obj_bounds.y + obj_bounds.h) }; obj_bounds_builder.Add(gpu_bounds); //Debug("Path %d %s -> %s via %s", id, m_document.m_objects.bounds[id].Str().c_str(), obj_bounds.Str().c_str(), pbounds.Str().c_str()); } GPUObjBounds p_gpu_bounds = { - Float(pbounds.x), - Float(pbounds.y), - Float(pbounds.x + pbounds.w), - Float(pbounds.y + pbounds.h) + ClampFloat(pbounds.x), + ClampFloat(pbounds.y), + ClampFloat(pbounds.x + pbounds.w), + ClampFloat(pbounds.y + pbounds.h) }; obj_bounds_builder.Add(p_gpu_bounds); }