Rename render to render/classic.

This will allow us to add additional renderers to the `render` folder.

PiperOrigin-RevId: 878913300
Change-Id: I205ae41250cbbcded406ad303d4e801d4cff892e
This commit is contained in:
Haroon Qureshi
2026-03-05 01:42:54 -08:00
committed by Copybara-Service
parent 5506fbf506
commit aef44210cb
32 changed files with 49 additions and 49 deletions
+1 -1
View File
@@ -116,7 +116,7 @@ add_subdirectory(src/user)
add_subdirectory(src/xml)
add_subdirectory(src/thread)
if(NOT EMSCRIPTEN AND NOT MUJOCO_USE_FILAMENT_MJR_COMPAT)
add_subdirectory(src/render)
add_subdirectory(src/render/classic)
add_subdirectory(src/ui)
endif()
@@ -53,7 +53,7 @@
#include <stdlib.h>
#include <string.h>
#include "engine/engine_util_errmem.h"
#include "render/glad/glad.h"
#include "render/classic/glad/glad.h"
static void* mjGlad_get_proc(const char *namez);
@@ -39,8 +39,8 @@
// Online:
// https://glad.dav1d.de/#profile=compatibility&language=c&specification=gl&loader=on&api=gl%3D1.5&extensions=GL_ARB_clip_control&extensions=GL_ARB_depth_buffer_float&extensions=GL_ARB_framebuffer_object&extensions=GL_ARB_seamless_cube_map&extensions=GL_ARB_vertex_buffer_object&extensions=GL_EXT_texture_sRGB&extensions=GL_KHR_debug
#ifndef MUJOCO_SRC_RENDER_GLAD_GLAD_H_
#define MUJOCO_SRC_RENDER_GLAD_GLAD_H_
#ifndef MUJOCO_SRC_RENDER_CLASSIC_GLAD_GLAD_H_
#define MUJOCO_SRC_RENDER_CLASSIC_GLAD_GLAD_H_
#ifdef __gl_h_
#error OpenGL header already included, remove this include, glad already provides it
@@ -2707,4 +2707,4 @@ GLAPI PFNGLGETPOINTERVKHRPROC mjGlad_glGetPointervKHR;
}
#endif
#endif // MUJOCO_SRC_RENDER_GLAD_GLAD_H_
#endif // MUJOCO_SRC_RENDER_CLASSIC_GLAD_GLAD_H_
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "render/glad/glad.h"
#include "render/classic/glad/glad.h"
extern "C" {
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "render/render_context.h"
#include "render/classic/render_context.h"
#include <inttypes.h> // IWYU pragma: keep
#include <math.h>
@@ -23,28 +23,28 @@
#include <mujoco/mjmacro.h>
#include <mujoco/mjvisualize.h>
#include <mujoco/mujoco.h>
#include "render/render_util.h"
#include "render/glad/glad.h"
#include "render/classic/render_util.h"
#include "render/classic/glad/glad.h"
// bitmap font definitions
#include "render/font/normal50.inc"
#include "render/font/normal100.inc"
#include "render/font/normal150.inc"
#include "render/font/normal200.inc"
#include "render/font/normal250.inc"
#include "render/font/normal300.inc"
#include "render/font/back50.inc"
#include "render/font/back100.inc"
#include "render/font/back150.inc"
#include "render/font/back200.inc"
#include "render/font/back250.inc"
#include "render/font/back300.inc"
#include "render/font/big50.inc"
#include "render/font/big100.inc"
#include "render/font/big150.inc"
#include "render/font/big200.inc"
#include "render/font/big250.inc"
#include "render/font/big300.inc"
#include "render/classic/font/normal50.inc"
#include "render/classic/font/normal100.inc"
#include "render/classic/font/normal150.inc"
#include "render/classic/font/normal200.inc"
#include "render/classic/font/normal250.inc"
#include "render/classic/font/normal300.inc"
#include "render/classic/font/back50.inc"
#include "render/classic/font/back100.inc"
#include "render/classic/font/back150.inc"
#include "render/classic/font/back200.inc"
#include "render/classic/font/back250.inc"
#include "render/classic/font/back300.inc"
#include "render/classic/font/big50.inc"
#include "render/classic/font/big100.inc"
#include "render/classic/font/big150.inc"
#include "render/classic/font/big200.inc"
#include "render/classic/font/big250.inc"
#include "render/classic/font/big300.inc"
@@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef MUJOCO_SRC_RENDER_RENDER_CONTEXT_H_
#define MUJOCO_SRC_RENDER_RENDER_CONTEXT_H_
#ifndef MUJOCO_SRC_RENDER_CLASSIC_RENDER_CONTEXT_H_
#define MUJOCO_SRC_RENDER_CLASSIC_RENDER_CONTEXT_H_
#include <mujoco/mjdata.h>
#include <mujoco/mjexport.h>
@@ -69,4 +69,4 @@ MJAPI void mjr_uploadHField(const mjModel* m, const mjrContext* con, int hfieldi
}
#endif
#endif // MUJOCO_SRC_RENDER_RENDER_CONTEXT_H_
#endif // MUJOCO_SRC_RENDER_CLASSIC_RENDER_CONTEXT_H_
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "render/render_gl2.h"
#include "render/classic/render_gl2.h"
#include <math.h>
#include <string.h>
@@ -21,7 +21,7 @@
#include <mujoco/mjmacro.h>
#include <mujoco/mujoco.h>
#include "engine/engine_array_safety.h"
#include "render/glad/glad.h"
#include "render/classic/glad/glad.h"
#define STRING_BUFSIZE 100
@@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef THIRD_PARTY_MUJOCO_SRC_RENDER_RENDER_GL2_
#define THIRD_PARTY_MUJOCO_SRC_RENDER_RENDER_GL2_
#ifndef THIRD_PARTY_MUJOCO_SRC_RENDER_CLASSIC_RENDER_GL2_
#define THIRD_PARTY_MUJOCO_SRC_RENDER_CLASSIC_RENDER_GL2_
#include <mujoco/mjexport.h>
#include <mujoco/mjrender.h>
@@ -81,4 +81,4 @@ MJAPI void mjr_figure(mjrRect viewport, mjvFigure* fig, const mjrContext* con);
#if defined(__cplusplus)
}
#endif
#endif // THIRD_PARTY_MUJOCO_SRC_RENDER_RENDER_GL2_
#endif // THIRD_PARTY_MUJOCO_SRC_RENDER_CLASSIC_RENDER_GL2_
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "render/render_gl3.h"
#include "render/classic/render_gl3.h"
#include <math.h>
#include <stdio.h>
@@ -24,10 +24,10 @@
#include <mujoco/mujoco.h>
#include "engine/engine_sort.h"
#include "engine/engine_vis_init.h"
#include "render/render_context.h"
#include "render/render_gl2.h"
#include "render/render_util.h"
#include "render/glad/glad.h"
#include "render/classic/render_context.h"
#include "render/classic/render_gl2.h"
#include "render/classic/render_util.h"
#include "render/classic/glad/glad.h"
//----------------------------- low-level 3D rendering ---------------------------------------------
@@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef THIRD_PARTY_MUJOCO_SRC_RENDER_RENDER_GL3_
#define THIRD_PARTY_MUJOCO_SRC_RENDER_RENDER_GL3_
#ifndef THIRD_PARTY_MUJOCO_SRC_RENDER_CLASSIC_RENDER_GL3_
#define THIRD_PARTY_MUJOCO_SRC_RENDER_CLASSIC_RENDER_GL3_
#include <mujoco/mjexport.h>
#include <mujoco/mjrender.h>
@@ -35,4 +35,4 @@ MJAPI int mjr_getError(void);
#if defined(__cplusplus)
}
#endif
#endif // THIRD_PARTY_MUJOCO_SRC_RENDER_RENDER_GL3_
#endif // THIRD_PARTY_MUJOCO_SRC_RENDER_CLASSIC_RENDER_GL3_
@@ -12,13 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "render/render_util.h"
#include "render/classic/render_util.h"
#include <math.h>
#include <string.h>
#include <mujoco/mujoco.h>
#include "render/glad/glad.h"
#include "render/classic/glad/glad.h"
//----------------------------- utility ------------------------------------------------------------
@@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef THIRD_PARTY_MUJOCO_SRC_RENDER_RENDER_UTIL_
#define THIRD_PARTY_MUJOCO_SRC_RENDER_RENDER_UTIL_
#ifndef THIRD_PARTY_MUJOCO_SRC_RENDER_CLASSIC_RENDER_UTIL_
#define THIRD_PARTY_MUJOCO_SRC_RENDER_CLASSIC_RENDER_UTIL_
#include <mujoco/mjexport.h>
#include <mujoco/mjrender.h>
@@ -70,4 +70,4 @@ MJAPI int mjr_findRect(int x, int y, int nrect, const mjrRect* rect);
#if defined(__cplusplus)
}
#endif
#endif // THIRD_PARTY_MUJOCO_SRC_RENDER_RENDER_UTIL_
#endif // THIRD_PARTY_MUJOCO_SRC_RENDER_CLASSIC_RENDER_UTIL_
+1 -1
View File
@@ -21,7 +21,7 @@
#include <mujoco/mjmacro.h>
#include <mujoco/mujoco.h>
#include "engine/engine_array_safety.h"
#include "render/glad/glad.h"
#include "render/classic/glad/glad.h"
//------------------------------------ Default themes ----------------------------------------------