Subversion Repositories gelsvn

Rev

Rev 145 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

#ifndef __MATERIAL_H__
#define __MATERIAL_H__

#include <string>
#include <vector>
#include "CGLA/Vec3f.h"
#include "CGLA/Vec3i.h"

namespace GLGraphics
{
                struct Material
                {
                                std::string name;                               /* name of material */
                                float diffuse[4];                       /* diffuse component */
                                float ambient[4];                       /* ambient component */
                                float specular[4];              /* specular component */
                                float shininess;                        /* specular exponent */

                                string tex_path, tex_name;
                                int tex_id;

                                Material():     name("default"), tex_id(-1) 
                                                {
                                                                shininess = 0;
                                                                diffuse[0] = 0.8;
                                                                diffuse[1] = 0.8;
                                                                diffuse[2] = 0.8;
                                                                diffuse[3] = 1.0;
                                                                ambient[0] = 0.2;
                                                                ambient[1] = 0.2;
                                                                ambient[2] = 0.2;
                                                                ambient[3] = 1.0;
                                                                specular[0] = 0.0;
                                                                specular[1] = 0.0;
                                                                specular[2] = 0.0;
                                                                specular[3] = 1.0;
                                                }
                };
}

#endif