Add flag to mjrContext to support legacy depth mapping by default
This commit is contained in:
@@ -39,6 +39,10 @@ typedef enum mjtFramebuffer_ { // OpenGL framebuffer option
|
||||
mjFB_OFFSCREEN // offscreen buffer
|
||||
} mjtFramebuffer;
|
||||
|
||||
typedef enum mjtDepthMapping_ { // OpenGL depth buffer readout mapping (from znear to zfar)
|
||||
mjDM_ZEROTOONE = 0, // Legacy default, reverses reversed Z rendering, performance penalty
|
||||
mjDM_ONETOZERO // Native output of reversed Z rendering, decreases numerical error
|
||||
} mjtDepthMapping;
|
||||
|
||||
typedef enum mjtFontScale_ { // font scale, used at context creation
|
||||
mjFONTSCALE_50 = 50, // 50% scale, suitable for low-res rendering
|
||||
@@ -151,6 +155,9 @@ struct mjrContext_ { // custom OpenGL context
|
||||
|
||||
// pixel output format
|
||||
int readPixelFormat; // default color pixel format for mjr_readPixels
|
||||
|
||||
// depth output format
|
||||
int readDepthMapping; // depth mapping, 0 to 1 (default, legacy), or 1 to 0 (reversed, native)
|
||||
};
|
||||
typedef struct mjrContext_ mjrContext;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user