mirror of
https://github.com/Halofreak1990/XFXFramework
synced 2024-12-26 13:49:34 +01:00
Added TypeInfo for all relevant types Added comments Updated DependencyProperty to work with System::Type Fixed casing on PropertyMetadata
80 lines
1.9 KiB
C++
80 lines
1.9 KiB
C++
/*****************************************************************************
|
|
* Effect.h *
|
|
* *
|
|
* XFX::Graphics::Effect class definition file *
|
|
* Copyright (c) XFX Team. All Rights Reserved *
|
|
*****************************************************************************/
|
|
#ifndef _XFX_GRAPHICS_EFFECT_
|
|
#define _XFX_GRAPHICS_EFFECT_
|
|
|
|
#include <Graphics/EffectParameterCollection.h>
|
|
#include <Graphics/EffectTechniqueCollection.h>
|
|
#include <Graphics/GraphicsResource.h>
|
|
|
|
namespace XFX
|
|
{
|
|
namespace Graphics
|
|
{
|
|
/**
|
|
* Used to set and query effects, and to choose techniques.
|
|
*/
|
|
class Effect : public GraphicsResource
|
|
{
|
|
private:
|
|
EffectParameterCollection _parameters;
|
|
EffectTechniqueCollection _techniques;
|
|
|
|
protected:
|
|
/**
|
|
* Creates an instance of this object.
|
|
*
|
|
* @param cloneSource
|
|
* An object to copy.
|
|
*/
|
|
Effect(Effect const * const cloneSource);
|
|
|
|
/**
|
|
* Releases the unmanaged resources used by the Effect and optionally releases the managed resources.
|
|
*/
|
|
void Dispose(bool disposing);
|
|
/**
|
|
* Applies the effect state just prior to rendering the effect.
|
|
*/
|
|
virtual void OnApply();
|
|
|
|
public:
|
|
/**
|
|
* Gets or sets the active technique.
|
|
*/
|
|
EffectTechnique* CurrentTechnique;
|
|
/**
|
|
* Gets a collection of parameters used for this effect.
|
|
*/
|
|
EffectParameterCollection& getParameters() const;
|
|
/**
|
|
* Gets a collection of techniques that are defined for this effect.
|
|
*/
|
|
EffectTechniqueCollection& getTechniques() const;
|
|
|
|
/**
|
|
* Creates an instance of this object.
|
|
*
|
|
* @param graphicsDevice
|
|
* The device.
|
|
*
|
|
* @param effectCode
|
|
* The effect code.
|
|
*/
|
|
Effect(GraphicsDevice * const graphicsDevice, byte effectCode[]);
|
|
|
|
/**
|
|
* Copies data from an existing object to this object.
|
|
*/
|
|
virtual Effect* Clone() const;
|
|
static const Type& GetType();
|
|
};
|
|
}
|
|
}
|
|
|
|
#endif //_XFX_GRAPHICS_EFFECT_
|