2013-06-02 14:32:43 +02:00
|
|
|
/*****************************************************************************
|
|
|
|
* BasicEffect.h *
|
|
|
|
* *
|
2013-07-12 21:30:13 +02:00
|
|
|
* XFX::Graphics::BasicEffect class definition file *
|
2013-06-02 14:32:43 +02:00
|
|
|
* Copyright (c) XFX Team. All Rights Reserved *
|
|
|
|
*****************************************************************************/
|
2013-05-05 18:18:41 +02:00
|
|
|
#ifndef _XFX_GRAPHICS_BASICEFFECT_
|
|
|
|
#define _XFX_GRAPHICS_BASICEFFECT_
|
|
|
|
|
|
|
|
#include <Graphics/Effect.h>
|
2013-06-02 14:32:43 +02:00
|
|
|
#include <Matrix.h>
|
|
|
|
#include <Vector3.h>
|
2013-05-05 18:18:41 +02:00
|
|
|
|
|
|
|
namespace XFX
|
|
|
|
{
|
|
|
|
namespace Graphics
|
|
|
|
{
|
|
|
|
class DirectionalLight;
|
|
|
|
class GraphicsDevice;
|
|
|
|
class Texture2D;
|
|
|
|
|
2013-07-12 21:30:13 +02:00
|
|
|
/**
|
|
|
|
* Contains a basic rendering effect.
|
|
|
|
*/
|
2013-05-05 18:18:41 +02:00
|
|
|
class BasicEffect : public Effect
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
int dirtyFlags;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
BasicEffect(BasicEffect const * const cloneSource);
|
|
|
|
void OnApply();
|
|
|
|
|
|
|
|
public:
|
|
|
|
float Alpha;
|
|
|
|
Vector3 AmbientLightColor;
|
|
|
|
Vector3 DiffuseColor;
|
|
|
|
DirectionalLight* getDirectionalLight0() const;
|
|
|
|
DirectionalLight* getDirectionalLight1() const;
|
|
|
|
DirectionalLight* getDirectionalLight2() const;
|
|
|
|
Vector3 EmissiveColor;
|
|
|
|
Vector3 FogColor;
|
|
|
|
bool FogEnabled;
|
|
|
|
float FogEnd;
|
|
|
|
float FogStart;
|
|
|
|
bool LightingEnabled;
|
|
|
|
bool PreferPerPixelLighting;
|
|
|
|
Matrix Projection;
|
|
|
|
Vector3 SpecularColor;
|
|
|
|
float SpecularPower;
|
|
|
|
Texture2D* Texture;
|
|
|
|
bool TextureEnabled;
|
|
|
|
bool VertexColorEnabled;
|
|
|
|
Matrix View;
|
|
|
|
Matrix World;
|
|
|
|
|
|
|
|
BasicEffect(GraphicsDevice * const device);
|
|
|
|
~BasicEffect();
|
|
|
|
|
|
|
|
Effect* Clone() const;
|
|
|
|
void EnableDefaultLighting();
|
2013-07-12 21:30:13 +02:00
|
|
|
static const Type& GetType();
|
2013-05-05 18:18:41 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif //_XFX_GRAPHICS_BASICEFFECT_
|