Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MotionBlurSimWindow to GUI #840

Merged
merged 1 commit into from
Jan 27, 2017
Merged

Add MotionBlurSimWindow to GUI #840

merged 1 commit into from
Jan 27, 2017

Conversation

hxbloom
Copy link
Contributor

@hxbloom hxbloom commented Jan 26, 2017

  1. Add Motion Blur to GUI by extending the SimWindow class, override only render() and displayTimer()
  2. The Motion Blur class supports change of motion blur quality, in 0-5 scale, 0 means no motion blur, 5 means highest motion blur quality.
  3. Only change needed to existing files are in line 86 of "GlutWindow.cpp"
    From glutInitDisplayMode(GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGBA | GLUT_MULTISAMPLE);
    To glutInitDisplayMode(GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGBA | GLUT_MULTISAMPLE | GLUT_ACCUM);
    To enable Accumulated Buffer of GLUT
  4. To test on existing examples, simply replace "class MyWindow : public dart::gui::SimWindow" with "class MyWindow : public dart::gui::MotionBlurSimWindow", in "MyWindow.cpp/hpp"
  5. Code is written in a style similar to existing files in "dart/gui"
  6. The quality of MotionBlur is set to 5, highest by default. So it will be slow, lower the quality to run faster.

This change is Reviewable

1. Add Motion Blur to GUI by extending the SimWindow class, override only render() and displayTimer()
2. The Motion Blur class supports change of motion blur quality, in 0-5 scale, 0 means no motion blur, 5 means highest motion blur quality.
3. Only change needed to existing files are in line 86 of "GlutWindow.cpp"
        From  glutInitDisplayMode(GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGBA | GLUT_MULTISAMPLE);
        To      glutInitDisplayMode(GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGBA | GLUT_MULTISAMPLE | GLUT_ACCUM);
    To enable Accumulated Buffer of GLUT
4. To test on existing examples, simply replace "class MyWindow : public dart::gui::SimWindow" with "class MyWindow : public dart::gui::MotionBlurSimWindow", in "MyWindow.cpp/hpp"
5. Code is written in a style similar to existing files in "dart/gui"
6. The quality of MotionBlur is set to 5, highest by default. So it will be slow, lower the quality to run faster.
Copy link
Member

@jslee02 jslee02 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks for your contribution!

@jslee02 jslee02 added this to the DART 6.2.0 milestone Jan 26, 2017
@jslee02 jslee02 merged commit cfac681 into dartsim:master Jan 27, 2017
@xemnas214
Copy link

xemnas214 commented Jan 31, 2017

Would the motion blur work on Dart 5.1 ?

@jslee02
Copy link
Member

jslee02 commented Jan 31, 2017

Would the motion blue work on Dart 5.1 ?

Sure. Backporting the motion blur would be straightforward. I could do this myself when I have a chance or PR is always welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants