git-svn-id: svn://db.shs.com.ru/libs@47 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2015-11-26 11:53:29 +00:00
parent 2ace72ff47
commit 4cbcbb5174
26 changed files with 346 additions and 105 deletions

View File

@@ -214,15 +214,15 @@ class Light: public GLObjectBase {
public:
enum Type {Omni, Directional, Cone};
Light(): GLObjectBase(), shadow_map(true, 1, GL_R16F) {type_ = GLObjectBase::Light; light_type = Omni; intensity = 1.; decay_linear = decay_quadratic = angle_spread = angle_decay_exp = decay_start = 0.; decay_const = decay_end = 1.; direction.setZ(1.);}
Light(const QVector3D & p, const QColor & c = Qt::white, GLdouble i = 1.): GLObjectBase(), shadow_map(true, 1, GL_R16F) {type_ = GLObjectBase::Light; light_type = Omni; pos_ = p; intensity = i; /*color_ = c;*/ decay_linear = decay_quadratic = angle_spread = angle_decay_exp = decay_start = 0.; decay_const = decay_end = 1.; direction.setZ(1.);}
Light();
Light(const QVector3D & p, const QColor & c = Qt::white, GLdouble i = 1.);
virtual GLObjectBase * clone(bool withChildren = true);
virtual void init() {shadow_map.resize(512, 512); is_init = true;}
virtual void draw(QGLShaderProgram * prog, bool simplest = false);
QVector3D direction;
GLdouble angle_spread;
GLdouble angle_decay_exp;
GLdouble angle_start;
GLdouble angle_end;
GLdouble intensity;
GLdouble decay_const;
GLdouble decay_linear;