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

This commit is contained in:
2017-10-03 12:20:32 +00:00
parent b46b9329f3
commit 7ad19d72c5
40 changed files with 320 additions and 712 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(QGLShaderProgram * prog, bool simplest = false);
virtual void draw(__GLShaderProgram__ * prog, bool simplest = false);
virtual void update() {}
bool isInit() const {return is_init;}
bool isTexturesLoaded() const {return is_tex_loaded;}
@@ -185,7 +185,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 deleteTextures() {foreach (GLuint i, textures) currentQGLView->deleteTexture(i); textures.clear();}
//void deleteTextures() {foreach (GLuint i, textures) currentQGLView->deleteTexture(i); textures.clear();}
void calculateBoundingBox();
void buildTransform();
void initInternal() {init(); loadTextures(); foreach (GLObjectBase * i, children_) i->initInternal();}
@@ -228,7 +228,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(QGLShaderProgram * prog, bool simplest = false);
virtual void draw(__GLShaderProgram__ * prog, bool simplest = false);
QVector3D direction, dir0, dir1;
GLdouble angle_start;