2010-12-04 16:14:34 +00:00
|
|
|
|
/********************************************************
|
|
|
|
|
* BasicEffect.h *
|
|
|
|
|
* *
|
|
|
|
|
* BasicEffect definition file *
|
|
|
|
|
* Copyright <EFBFBD> XFX Team. All Rights Reserved *
|
|
|
|
|
********************************************************/
|
|
|
|
|
#ifndef _BASICEFFECT_H_
|
|
|
|
|
#define _BASICEFFECT_H_
|
|
|
|
|
|
|
|
|
|
#include "BasicDirectionalLight.h"
|
|
|
|
|
#include "Effect.h"
|
|
|
|
|
//#include "GraphicsDevice.h"
|
|
|
|
|
#include <Matrix.h>
|
|
|
|
|
#include "Texture2D.h"
|
|
|
|
|
#include <Vector3.h>
|
|
|
|
|
|
|
|
|
|
namespace XFX
|
|
|
|
|
{
|
|
|
|
|
namespace Graphics
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Represents shader model 1.1 Effect that has optional support for vertex colors, texturing, and lighting.
|
|
|
|
|
/// </summary>
|
|
|
|
|
class BasicEffect : public Effect
|
|
|
|
|
{
|
|
|
|
|
protected:
|
2010-12-27 01:01:25 +00:00
|
|
|
|
BasicEffect(GraphicsDevice device, BasicEffect clone);
|
2010-12-04 16:14:34 +00:00
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
float Alpha;
|
|
|
|
|
Vector3 AmbientLightColor;
|
|
|
|
|
Vector3 DiffuseColor;
|
|
|
|
|
BasicDirectionalLight DirectionalLight0();
|
|
|
|
|
BasicDirectionalLight DirectionalLight1();
|
|
|
|
|
BasicDirectionalLight DirectionalLight2();
|
|
|
|
|
Vector3 EmissiveColor;
|
|
|
|
|
Vector3 FogColor;
|
|
|
|
|
int FogEnabled;
|
|
|
|
|
float FogEnd;
|
|
|
|
|
float FogStart;
|
|
|
|
|
int LightingEnabled;
|
|
|
|
|
int PreferPerPixelLighting;
|
|
|
|
|
Matrix Projection;
|
|
|
|
|
Vector3 SpecularColor;
|
|
|
|
|
float SpecularPower;
|
2010-12-27 01:01:25 +00:00
|
|
|
|
Texture2D Texture_;
|
2010-12-04 16:14:34 +00:00
|
|
|
|
int TextureEnabled;
|
|
|
|
|
int VertexColorEnabled;
|
|
|
|
|
Matrix View;
|
|
|
|
|
Matrix World;
|
|
|
|
|
|
2010-12-27 01:01:25 +00:00
|
|
|
|
BasicEffect(GraphicsDevice device, EffectPool effectPool);
|
2010-12-04 16:14:34 +00:00
|
|
|
|
|
2010-12-27 01:01:25 +00:00
|
|
|
|
Effect Clone(GraphicsDevice device);
|
2010-12-04 16:14:34 +00:00
|
|
|
|
void EnableDefaultLighting();
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif //_BASICEFFECT_H_
|