Merge pull request #3340 from devshahofficial:devshahofficial/mjr-renderer-info
PiperOrigin-RevId: 948183711 Change-Id: I28b256eca22e86ec0ba05a4fa26458d678aca130
This commit is contained in:
@@ -117,6 +117,12 @@ typedef struct mjrRect_ { // OpenGL rectangle
|
||||
} mjrRect;
|
||||
|
||||
|
||||
typedef struct mjrRendererInfo_ { // active renderer identity
|
||||
const char* renderer; // renderer family: classic, filament, noop
|
||||
const char* backend; // graphics backend: opengl, vulkan; empty if uninitialized
|
||||
} mjrRendererInfo;
|
||||
|
||||
|
||||
typedef struct mjrVertexAttribute_ { // vertex attribute format specification
|
||||
const void* bytes; // vertex data
|
||||
int usage; // position, normal, etc [mjrVertexAttributeUsage]
|
||||
|
||||
@@ -104,6 +104,9 @@ mjrfContext* mjrf_createContext(const mjrfContextConfig* config);
|
||||
// Destroys the filament rendering context.
|
||||
void mjrf_destroyContext(mjrfContext* ctx);
|
||||
|
||||
// Gets active renderer information for the given filament context.
|
||||
void mjrf_getRendererInfo(mjrfContext* ctx, mjrRendererInfo* info);
|
||||
|
||||
typedef enum mjrDrawMode_ { // how to draw objects in the scene
|
||||
mjDRAW_MODE_DEFAULT, // default colors and lighting
|
||||
mjDRAW_MODE_DEFAULT_NO_TEXTURES, // default, but without textures
|
||||
|
||||
@@ -855,6 +855,12 @@ MJAPI void mjv_cameraFrustum(float zver[2], float zhor[2], float zclip[2], cons
|
||||
// Set default mjrContext.
|
||||
MJAPI void mjr_defaultContext(mjrContext* con);
|
||||
|
||||
// Set default mjrRendererInfo.
|
||||
MJAPI void mjr_defaultRendererInfo(mjrRendererInfo* info);
|
||||
|
||||
// Get active renderer information.
|
||||
MJAPI void mjr_getRendererInfo(mjrRendererInfo* info);
|
||||
|
||||
// Allocate resources in custom OpenGL context; fontscale is mjtFontScale.
|
||||
MJAPI void mjr_makeContext(const mjModel* m, mjrContext* con, int fontscale);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user