full support of ObjectBase:: isReceiveShadows, isCastShadows, isAcceptLight and isAcceptFog

This commit is contained in:
2023-02-12 22:49:38 +03:00
parent e3389bcc20
commit c8dcd5e9c0
10 changed files with 84 additions and 40 deletions

View File

@@ -241,7 +241,12 @@ void Renderer::fillObjectsBuffer(const ObjectBaseList & ol, RenderPass pass) {
so.material = 0;
so.color = QColor2QVector(o->color());
}
so.object_id = o->id();
so.object_id = o->id();
so.flags = 0;
so.f_accept_light = o->isAcceptLight();
so.f_accept_fog = o->isAcceptFog();
so.f_accept_cast_shadow = o->isCastShadows();
so.f_accept_rec_shadow = o->isReceiveShadows();
o->worldTransform().transposed().copyDataTo(so.modelmatrix);
o->textureGLMatrix().copyDataTo(so.texturematrix);
// qDebug() << "load obj" << o->name() << o->textureMatrix() << tmat;

View File

@@ -110,7 +110,6 @@ public:
protected:
void fillObjectsBuffer(const ObjectBaseList & ol, RenderPass pass);
void reloadObjects();
void renderObjects(Scene & scene, RenderPass pass);
void renderLight(int first_wr_buff, bool clear_only);
void renderShadow(int index, Light * light);