shadows basically works
This commit is contained in:
@@ -26,11 +26,10 @@
|
||||
// static int _count = 0;
|
||||
|
||||
ObjectBase::ObjectBase(Mesh * geom, Material * mat) {
|
||||
type_ = glMesh;
|
||||
render_mode = View;
|
||||
prev_pass = rpSolid;
|
||||
parent_ = nullptr;
|
||||
color_ = Qt::white;
|
||||
type_ = glMesh;
|
||||
prev_pass = rpSolid;
|
||||
parent_ = nullptr;
|
||||
color_ = Qt::white;
|
||||
is_root = is_init = selected_ = false;
|
||||
visible_ = accept_fog = accept_light = cast_shadow = rec_shadow = select_ = true;
|
||||
line_width = -1.;
|
||||
@@ -588,7 +587,7 @@ void AimedObject::orbitXY(const float & a) {
|
||||
void AimedObject::transformChanged() {}
|
||||
|
||||
|
||||
Light::Light(): AimedObject(), shadow_map(0, true, GL_R16F) {
|
||||
Light::Light(): AimedObject(), shadow_map(nullptr, 1, true) {
|
||||
type_ = glLight;
|
||||
light_type = Omni;
|
||||
intensity = 1.;
|
||||
@@ -599,7 +598,7 @@ Light::Light(): AimedObject(), shadow_map(0, true, GL_R16F) {
|
||||
}
|
||||
|
||||
|
||||
Light::Light(const QVector3D & p, const QColor & c, float i): AimedObject(), shadow_map(0, true, GL_R16F) {
|
||||
Light::Light(const QVector3D & p, const QColor & c, float i): AimedObject(), shadow_map(nullptr, 1, true) {
|
||||
type_ = glLight;
|
||||
light_type = Omni;
|
||||
intensity = i;
|
||||
@@ -655,7 +654,6 @@ QDataStream & operator<<(QDataStream & s, const ObjectBase * p) {
|
||||
.add(6, p->rec_shadow)
|
||||
.add(7, p->raw_matrix)
|
||||
.add(8, p->line_width)
|
||||
.add(9, int(p->render_mode))
|
||||
.add(14, p->mat_)
|
||||
.add(16, p->children_.size())
|
||||
.add(17, p->name_)
|
||||
@@ -741,9 +739,6 @@ QDataStream & operator>>(QDataStream & s, ObjectBase *& p) {
|
||||
case 8:
|
||||
if (p) p->line_width = cs.getData<float>();
|
||||
break;
|
||||
case 9:
|
||||
if (p) p->render_mode = (ObjectBase::RenderMode)cs.getData<int>();
|
||||
break;
|
||||
case 14:
|
||||
if (p) p->mat_ = cs.getData<QMatrix4x4>();
|
||||
break;
|
||||
|
||||
@@ -39,12 +39,6 @@ public:
|
||||
glCamera,
|
||||
glParticlesSystem
|
||||
};
|
||||
enum RenderMode {
|
||||
View = 0,
|
||||
Point = GL_POINT,
|
||||
Line = GL_LINE,
|
||||
Fill = GL_FILL
|
||||
};
|
||||
|
||||
explicit ObjectBase(Mesh * geom = 0, Material * mat = 0);
|
||||
virtual ~ObjectBase();
|
||||
@@ -61,9 +55,6 @@ public:
|
||||
RenderPass pass() const;
|
||||
uint id() const { return id_; }
|
||||
|
||||
RenderMode renderMode() const { return render_mode; }
|
||||
void setRenderMode(RenderMode mode) { render_mode = mode; }
|
||||
|
||||
float lineWidth() const { return line_width; }
|
||||
void setLineWidth(const float & width) { line_width = width; }
|
||||
|
||||
@@ -338,7 +329,6 @@ protected:
|
||||
QColor color_;
|
||||
uint id_;
|
||||
Type type_;
|
||||
RenderMode render_mode;
|
||||
Box3D bound;
|
||||
Transform trans, trans_texture;
|
||||
ObjectBaseList children_;
|
||||
|
||||
Reference in New Issue
Block a user