Add an option in mjrContext for mjr_readPixels output format.

PiperOrigin-RevId: 500342924
Change-Id: I43e8c6208db341e2bdbef10382b7293c35bdca65
This commit is contained in:
Saran Tunyasuvunakool
2023-01-07 00:10:03 -08:00
committed by Copybara-Service
parent e40775fab3
commit 1215067f5c
5 changed files with 11 additions and 1 deletions
+3
View File
@@ -1602,6 +1602,9 @@ void mjr_makeContext_offSize(const mjModel* m, mjrContext* con, int fontscale,
while ((err = glGetError())) {
mju_warning_i("OpenGL error 0x%x in or before mjr_makeContext", err);
}
// set default color pixel format for mjr_readPixels
con->readPixelFormat = GL_RGB;
}