History log of /haiku/src/add-ons/screen_savers/gravity/Gravity.h
Revision Date Author Comments
# 1333f5f7 14-Aug-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

Fix GL screensavers in non-direct mode.

DirectDraw is called only in direct drawing mode (BDirectWindow). Our GL
kit also works fine (but slower) in indirect mode (standard BWindow, GL
stuff rendered offscreen then blitted). However, for this to work we
need the screensavers to actually do something. Use the
BScreenSaver::Draw method, which is called in either case.

This makes it possible to use indirect mode for the preview of GL
screensavers. The performance isn't really a problem on the very small
preview (160x200 pixels).

Fixes GLife and Gravity. Flurry still crashes Mesa.


# 8e727810 23-Feb-2014 John Scipione <jscipione@gmail.com>

Gravity: Live update settings and cleanup

Now that this screensaver shows a preview, update the settings live
so that the display updates immediately.

Since this didn't work before this screensaver took a shortcut and only
updated the settings when the saver started.

Some other changes include:
* Update copyright header, add myself to the authors list.
* Convert Particle from using a BList to a BObjectList and remove casts.
* Use switch statement to set particle color that has a default case for blue.
* Initialize member variables to a default value in the constructor.
* Remove Constants.h, the remaining constants are in ConfigView.cpp
* Convert deprecated GroupLayoutBuilder to a LayoutBuilder template instance
* Convert GravitySource from a class to a struct since all members are public.
* Simplify realCount calculation to just a single left shift.
* A bunch of style fixes
- lots of whitespace fixes
- rename rect to frame in GravityView and ConfigView
- reorder the frame parameter first in GravityView and ConfigView
- curly brace goes on same line as class or struct declaration

This turned out to be a bigger change than I originally intended to make.


# 8cd10c71 31-Dec-2012 Tri-Edge AI <triedgeai@gmail.com>

Gravity: Big code changes

* Reworked code style completely.
* Improved the behaviour of the particles.
* Made particles smaller (2,5x performance gain).
* Cleaned unnecessary includes.
* Tried improving performance with glCallList - performance dropped even more.
* Tried improving performance with glDrawArrays - no noticeable performance changes.


# 1333f5f77b3556974cac8ef2906ee03c3caf2875 14-Aug-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

Fix GL screensavers in non-direct mode.

DirectDraw is called only in direct drawing mode (BDirectWindow). Our GL
kit also works fine (but slower) in indirect mode (standard BWindow, GL
stuff rendered offscreen then blitted). However, for this to work we
need the screensavers to actually do something. Use the
BScreenSaver::Draw method, which is called in either case.

This makes it possible to use indirect mode for the preview of GL
screensavers. The performance isn't really a problem on the very small
preview (160x200 pixels).

Fixes GLife and Gravity. Flurry still crashes Mesa.


# 8e727810a7795df5c54b6f67a966969d8bbdb539 23-Feb-2014 John Scipione <jscipione@gmail.com>

Gravity: Live update settings and cleanup

Now that this screensaver shows a preview, update the settings live
so that the display updates immediately.

Since this didn't work before this screensaver took a shortcut and only
updated the settings when the saver started.

Some other changes include:
* Update copyright header, add myself to the authors list.
* Convert Particle from using a BList to a BObjectList and remove casts.
* Use switch statement to set particle color that has a default case for blue.
* Initialize member variables to a default value in the constructor.
* Remove Constants.h, the remaining constants are in ConfigView.cpp
* Convert deprecated GroupLayoutBuilder to a LayoutBuilder template instance
* Convert GravitySource from a class to a struct since all members are public.
* Simplify realCount calculation to just a single left shift.
* A bunch of style fixes
- lots of whitespace fixes
- rename rect to frame in GravityView and ConfigView
- reorder the frame parameter first in GravityView and ConfigView
- curly brace goes on same line as class or struct declaration

This turned out to be a bigger change than I originally intended to make.


# 8cd10c710fcecc63e86ac1d9db3db25e176d0c3e 31-Dec-2012 Tri-Edge AI <triedgeai@gmail.com>

Gravity: Big code changes

* Reworked code style completely.
* Improved the behaviour of the particles.
* Made particles smaller (2,5x performance gain).
* Cleaned unnecessary includes.
* Tried improving performance with glCallList - performance dropped even more.
* Tried improving performance with glDrawArrays - no noticeable performance changes.