mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
gl-max-errors
This commit is contained in:
parent
1f99794cdb
commit
1d5038e9f0
@ -4274,9 +4274,7 @@ bool CLP(GraphicsStateGuardian)::
|
||||
report_errors_loop(int line, const char *source_file, GLenum error_code,
|
||||
int &error_count) {
|
||||
#ifndef NDEBUG
|
||||
static const int max_gl_errors_reported = 20;
|
||||
|
||||
while ((error_count < max_gl_errors_reported) &&
|
||||
while ((CLP(max_errors) < 0 || error_count < CLP(max_errors)) &&
|
||||
(error_code != GL_NO_ERROR)) {
|
||||
GLCAT.error()
|
||||
<< "at " << line << " of " << source_file << " : "
|
||||
|
@ -94,6 +94,12 @@ ConfigVariableBool CLP(parallel_arrays)
|
||||
"render geometry as it appears in the GeomVertexData. See "
|
||||
"also gl-interleaved-arrays."));
|
||||
|
||||
ConfigVariableInt CLP(max_errors)
|
||||
("gl-max-errors", 20,
|
||||
PRC_DESC("This is the limit on the number of OpenGL errors Panda will "
|
||||
"detect and report before it shuts down rendering. Set it to "
|
||||
"-1 for no limit."));
|
||||
|
||||
extern ConfigVariableBool CLP(parallel_arrays);
|
||||
|
||||
void CLP(init_classes)() {
|
||||
|
@ -32,6 +32,7 @@ extern ConfigVariableBool CLP(support_occlusion_query);
|
||||
extern ConfigVariableBool CLP(compile_and_execute);
|
||||
extern ConfigVariableBool CLP(interleaved_arrays);
|
||||
extern ConfigVariableBool CLP(parallel_arrays);
|
||||
extern ConfigVariableInt CLP(max_errors);
|
||||
|
||||
extern EXPCL_GL void CLP(init_classes)();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user