fix GL crash
This commit is contained in:
parent
d0c8788d97
commit
f660bfc9fc
|
|
@ -3012,7 +3012,6 @@ prepare_index_buffer(qpGeomPrimitive *data) {
|
|||
_glGenBuffers(1, &gibc->_index);
|
||||
|
||||
if (GLCAT.is_debug()) {
|
||||
const qpGeomVertexArrayData *vertices = data->get_vertices();
|
||||
GLCAT.debug()
|
||||
<< "creating index buffer " << gibc->_index << ": "
|
||||
<< data->get_num_vertices() << " indices ("
|
||||
|
|
|
|||
|
|
@ -88,6 +88,17 @@ was_modified() const {
|
|||
return _modified != _data->get_modified();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: IndexBufferContext::get_modified
|
||||
// Access: Public
|
||||
// Description: Returns the UpdateSeq that was recorded the last time
|
||||
// mark_loaded() was called.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE UpdateSeq IndexBufferContext::
|
||||
get_modified() const {
|
||||
return _modified;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: IndexBufferContext::mark_loaded
|
||||
// Access: Public
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ public:
|
|||
INLINE bool changed_size() const;
|
||||
INLINE bool changed_usage_hint() const;
|
||||
INLINE bool was_modified() const;
|
||||
INLINE UpdateSeq get_modified() const;
|
||||
|
||||
INLINE void mark_loaded();
|
||||
|
||||
|
|
|
|||
|
|
@ -170,6 +170,7 @@ add_vertex(int vertex) {
|
|||
|
||||
index.add_data1i(vertex);
|
||||
|
||||
cdata->_modified = qpGeom::get_next_modified();
|
||||
cdata->_got_minmax = false;
|
||||
}
|
||||
|
||||
|
|
@ -203,6 +204,7 @@ add_consecutive_vertices(int start, int num_vertices) {
|
|||
index.add_data1i(v);
|
||||
}
|
||||
|
||||
cdata->_modified = qpGeom::get_next_modified();
|
||||
cdata->_got_minmax = false;
|
||||
}
|
||||
|
||||
|
|
@ -267,6 +269,8 @@ close_primitive() {
|
|||
#endif
|
||||
}
|
||||
|
||||
cdata->_modified = qpGeom::get_next_modified();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -284,6 +288,7 @@ clear_vertices() {
|
|||
cdata->_ends.clear();
|
||||
cdata->_mins.clear();
|
||||
cdata->_maxs.clear();
|
||||
cdata->_modified = qpGeom::get_next_modified();
|
||||
cdata->_got_minmax = false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -88,6 +88,17 @@ was_modified() const {
|
|||
return _modified != _data->get_modified();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: VertexBufferContext::get_modified
|
||||
// Access: Public
|
||||
// Description: Returns the UpdateSeq that was recorded the last time
|
||||
// mark_loaded() was called.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE UpdateSeq VertexBufferContext::
|
||||
get_modified() const {
|
||||
return _modified;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: VertexBufferContext::mark_loaded
|
||||
// Access: Public
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ public:
|
|||
INLINE bool changed_size() const;
|
||||
INLINE bool changed_usage_hint() const;
|
||||
INLINE bool was_modified() const;
|
||||
INLINE UpdateSeq get_modified() const;
|
||||
|
||||
INLINE void mark_loaded();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue