Unit fbu_effectmanager

DescriptionusesClasses, Interfaces, Objects and RecordsFunctions and ProceduresTypesConstantsVariables

Description

fb_effectmanager is an optional extension for FireBlade. The manager intends to simplify the handling of FireBlade in your projects. The basic idea of this class is to make it possible to simply add an effect to the manager and let him do the rest.

Therefore there is a unified effect class called TFBParticleEffect, from which you can derive of and implement your effects. This makes the handling of the manager very easy, but leaves the whole flexibility and power that FireBlade provides. An example of use would be the implementation of emitters to control FireBlade on a higher level, like other particle engines.

But the manager can do more than that. If you have ever worked with alpha blending, you will know that the renderorder plays a very important role. If the render order is "wrong", then you may see an effect in front of another effect although the effect is positioned behind the other one. The manager solves this problem with a very efficient sort algorythm. The manager won't sort until there is defineately a need to. It recognizes with a simple but effective trick whether the array is sorted or not.

Another feature helps to get the best performance out of FireBlade. To make an effect appear and run fluid, you mostly do not need the full framerate the application delivers. Therefor the manager is able to update the effects with a certain interval. But for optimal fluency it is important to not update all effects at once, so the manager automatically calculates time offsets for each effect. This technique saves tons of performance since it is at most not the rendering which makes particle effects slow, but the updating is.

fbu_effectmanager is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.

Copyright (C) 2005, 2009 by Sebastian Wagner. Special thanks to the DelphiGL community!

Requirements: FireBlade: http://sourceforge.net/projects/fireblade/ dglOpenGL: www.delphigl.com

Overview

Classes, Interfaces, Objects and Records

Name Description
Class TFBU_Effect  
Class TFBU_EffectManager  

Types

TFBU_RackTextureCallback = procedure(AFileName, AUnitName: String; var ATexture: TGLUInt) of object;
TFBU_NotifyEvent = procedure(Sender: TObject) of object;

Description

Types

TFBU_RackTextureCallback = procedure(AFileName, AUnitName: String; var ATexture: TGLUInt) of object;

This can be used as a normalized texture load callback for a "rack unit", which contains several classes derived from TFBParticleEffect

Parameters
AFileName
Filename of the texture without path
AUnitName
Unit name of the rack, for separating purposes
ATexture
This is where the texture name shall be stored in
TFBU_NotifyEvent = procedure(Sender: TObject) of object;
 

Author

Created

10.21.07

Last Modified

22.05.09


Generated by PasDoc 0.11.0 on 2009-06-29 23:12:33