00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef _MATERIAL_H
00026 #define _MATERIAL_H
00027
00028 #ifdef WIN32
00029 #include <windows.h>
00030 #endif
00031
00032
00033 #include "texture.h"
00034 #include "color.h"
00035
00036 namespace ngn {
00037 namespace core {
00038
00039
00040 class Material
00041 {
00042 public:
00043 Material();
00044 Material( const Material& other );
00045 Material( const Texture& texture, const Colorf& color );
00046 virtual ~Material();
00047
00048
00049 void bind();
00050
00051 void enable();
00052
00053 void disable();
00054
00055 void setTexture( const Texture& texture );
00056 void setColor( const Colorf& color );
00057 void setBlendMode( unsigned int src, unsigned int dest );
00058
00059 const Texture& getTexture() const;
00060 const Colorf& getColor() const;
00061 unsigned int getBlendSrc() const;
00062 unsigned int getBlendDst() const;
00063
00064
00065
00066 private:
00067 Colorf m_color;
00068 Texture m_tex;
00069 unsigned int m_blend_src;
00070 unsigned int m_blend_dst;
00071
00072 };
00073
00074
00075
00076 }
00077 }
00078 #endif