diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-03-15 23:56:33 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-03-15 23:56:33 +0400 |
commit | 2d21e6521f99825cd4c5783ca6866910947c7e13 (patch) | |
tree | 6bd977781c715f8fa0c8ce5bb8e373ef57777c95 /source/blender/editors/physics/particle_edit.c | |
parent | 88cf1a2bc73bbd2f2fbf2ba3d5b1e7d4a1db7a93 (diff) |
Fix: multisample viewport drawing didn't work well with selection or particle
brushes, due to issues with color coded drawing or slow/buggy reading from such
a buffer on some systems.
In case multisample is enabled now, it uses an offscreen buffer for such drawing,
which is not multisampled and so should not cause issues. This does mean there is
some extra GPU memory usage when multisample is enabled, and we could optimize
triple buffer to work together here somehow to share buffers, but it's better than
having selection not working.
Diffstat (limited to 'source/blender/editors/physics/particle_edit.c')
-rw-r--r-- | source/blender/editors/physics/particle_edit.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index 6c80f9377df..329f1f67c4a 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -430,15 +430,6 @@ static int key_test_depth(PEData *data, const float co[3], const int screen_co[2 gluProject(co[0], co[1], co[2], data->mats.modelview, data->mats.projection, (GLint *)data->mats.viewport, &ux, &uy, &uz); -#if 0 /* works well but too slow on some systems [#23118] */ - screen_co[0] += (short)data->vc.ar->winrct.xmin; - screen_co[1] += (short)data->vc.ar->winrct.ymin; - - /* PE_set_view3d_data calls this. no need to call here */ - /* view3d_validate_backbuf(&data->vc); */ - glReadPixels(screen_co[0], screen_co[1], 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT, &depth); -#else /* faster to use depths, these are calculated in PE_set_view3d_data */ - /* check if screen_co is within bounds because brush_cut uses out of screen coords */ if (screen_co[0] >= 0 && screen_co[0] < vd->w && screen_co[1] >= 0 && screen_co[1] < vd->h) { BLI_assert(vd && vd->depths); @@ -447,7 +438,6 @@ static int key_test_depth(PEData *data, const float co[3], const int screen_co[2 } else return 0; -#endif if ((float)uz - 0.00001f > depth) return 0; |