mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
protect against negative limits
This commit is contained in:
parent
a0d8f98452
commit
25e5c77e80
@ -908,8 +908,12 @@ reset() {
|
||||
GLint max_elements_vertices, max_elements_indices;
|
||||
GLP(GetIntegerv)(GL_MAX_ELEMENTS_VERTICES, &max_elements_vertices);
|
||||
GLP(GetIntegerv)(GL_MAX_ELEMENTS_INDICES, &max_elements_indices);
|
||||
_max_vertices_per_array = max_elements_vertices;
|
||||
_max_vertices_per_primitive = max_elements_indices;
|
||||
if (max_elements_vertices > 0) {
|
||||
_max_vertices_per_array = max_elements_vertices;
|
||||
}
|
||||
if (max_elements_indices > 0) {
|
||||
_max_vertices_per_primitive = max_elements_indices;
|
||||
}
|
||||
|
||||
if (GLCAT.is_debug()) {
|
||||
GLCAT.debug()
|
||||
|
Loading…
x
Reference in New Issue
Block a user