mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
fix core dump when rendering frustum
This commit is contained in:
parent
fc4051f994
commit
c5557d80c2
@ -161,9 +161,6 @@ draw_lines() {
|
||||
if (!_list.empty()) {
|
||||
_created_data = NULL;
|
||||
|
||||
CPT(RenderAttrib) thick = RenderModeAttrib::make(RenderModeAttrib::M_unchanged, _thick);
|
||||
CPT(RenderState) state = RenderState::make(thick);
|
||||
|
||||
PT(GeomVertexData) vdata = new GeomVertexData
|
||||
("portal", GeomVertexFormat::get_v3cp(), Geom::UH_static);
|
||||
GeomVertexWriter vertex(vdata, InternalName::get_vertex());
|
||||
@ -205,12 +202,12 @@ draw_lines() {
|
||||
if (lines->get_num_vertices() != 0) {
|
||||
PT(Geom) geom = new Geom(vdata);
|
||||
geom->add_primitive(lines);
|
||||
_previous->add_geom(geom, state);
|
||||
_previous->add_geom(geom);
|
||||
}
|
||||
if (points->get_num_vertices() != 0) {
|
||||
PT(Geom) geom = new Geom(vdata);
|
||||
geom->add_primitive(points);
|
||||
_previous->add_geom(geom, state);
|
||||
_previous->add_geom(geom);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -121,7 +121,6 @@ private:
|
||||
|
||||
LineList _list;
|
||||
Colorf _color;
|
||||
float _thick;
|
||||
|
||||
PT(GeomVertexData) _created_data;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user