Include the size limit in error message from mjr_addAux.
This is to help debug #1274. PiperOrigin-RevId: 590215990 Change-Id: I356675be84f9cb2892d31d4dc7639adf49fe4a0f
This commit is contained in:
committed by
Copybara-Service
parent
35f095d7c5
commit
e3df84ec3f
@@ -1675,8 +1675,17 @@ void mjr_addAux(int index, int width, int height, int samples, mjrContext* con)
|
|||||||
// check max size
|
// check max size
|
||||||
int maxSize = 0;
|
int maxSize = 0;
|
||||||
glGetIntegerv(GL_MAX_RENDERBUFFER_SIZE, &maxSize);
|
glGetIntegerv(GL_MAX_RENDERBUFFER_SIZE, &maxSize);
|
||||||
if (width > maxSize || height > maxSize) {
|
if (width > maxSize) {
|
||||||
mju_error("Auxiliary buffer size exceeds maximum allowed by OpenGL implementation");
|
mju_error(
|
||||||
|
"Auxiliary buffer width exceeds maximum allowed by OpenGL "
|
||||||
|
"implementation: %d > %d",
|
||||||
|
width, maxSize);
|
||||||
|
}
|
||||||
|
if (height > maxSize) {
|
||||||
|
mju_error(
|
||||||
|
"Auxiliary buffer height exceeds maximum allowed by OpenGL "
|
||||||
|
"implementation: %d > %d",
|
||||||
|
height, maxSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
// clamp samples request
|
// clamp samples request
|
||||||
|
|||||||
Reference in New Issue
Block a user