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

This commit is contained in:
2019-05-24 19:06:35 +00:00
parent 1082db07c6
commit 58fce3cd81
29 changed files with 394 additions and 599 deletions

View File

@@ -48,7 +48,7 @@ public:
void setName(const QString & name) {name_ = name;}
//virtual GLuint hList() {return list;}
virtual void init() {calculateBoundingBox(); vbo.init(); vbo.rebuffer(); /*material_.reflection.create();*/ /*qDebug() << "init" << vbo.buffer_;*/ is_init = true;}
virtual void draw(__GLShaderProgram__ * prog, bool simplest = false);
virtual void draw(QOpenGLShaderProgram * prog, bool simplest = false);
virtual void update() {}
bool isInit() const {return is_init;}
bool isTexturesLoaded() const {return is_tex_loaded;}
@@ -192,7 +192,7 @@ public:
protected:
void addChildren(QList<GLObjectBase * > & list, GLObjectBase * where);
void loadTextures(bool with_children = false) {material_.loadTextures((GLTextureManagerBase * )currentGLTextureManager); if (with_children) foreach (GLObjectBase * i, children_) i->loadTextures(); is_tex_loaded = true; checkPass();}
void loadTextures(bool with_children = false) {material_.loadTextures(view_->textureManager()); if (with_children) foreach (GLObjectBase * i, children_) i->loadTextures(); is_tex_loaded = true; checkPass();}
//void deleteTextures() {foreach (GLuint i, textures) currentQGLView->deleteTexture(i); textures.clear();}
void buildTransform();
void initInternal() {init(); loadTextures(); foreach (GLObjectBase * i, children_) i->initInternal();}
@@ -236,7 +236,7 @@ public:
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(__GLShaderProgram__ * prog, bool simplest = false);
virtual void draw(QOpenGLShaderProgram * prog, bool simplest = false);
QVector3D direction, dir0, dir1;
GLdouble angle_start;