Make mjrf types opaque in header.
PiperOrigin-RevId: 938409081 Change-Id: I8b9680dcb04f56aadf9ffd601b08025fc624c656
This commit is contained in:
committed by
Copybara-Service
parent
2a5345ba8c
commit
07e292bc6b
@@ -52,13 +52,13 @@ extern "C" {
|
||||
// values are assumed to be 0/NULL unless otherwise specified.
|
||||
//
|
||||
// For now, we'll just define opaque handles for each of our components.
|
||||
typedef struct mjrfContext_ {} mjrfContext;
|
||||
typedef struct mjrfTexture_ {} mjrfTexture;
|
||||
typedef struct mjrfMesh_ {} mjrfMesh;
|
||||
typedef struct mjrfScene_ {} mjrfScene;
|
||||
typedef struct mjrfLight_ {} mjrfLight;
|
||||
typedef struct mjrfRenderable_ {} mjrfRenderable;
|
||||
typedef struct mjrfRenderTarget_ {} mjrfRenderTarget;
|
||||
typedef struct mjrfContext_ mjrfContext;
|
||||
typedef struct mjrfTexture_ mjrfTexture;
|
||||
typedef struct mjrfMesh_ mjrfMesh;
|
||||
typedef struct mjrfScene_ mjrfScene;
|
||||
typedef struct mjrfLight_ mjrfLight;
|
||||
typedef struct mjrfRenderable_ mjrfRenderable;
|
||||
typedef struct mjrfRenderTarget_ mjrfRenderTarget;
|
||||
|
||||
// ## Rendering Context (mjrfContext)
|
||||
//
|
||||
|
||||
@@ -52,6 +52,7 @@ target_sources(${MUJOCO_FILAMENT_TARGET_NAME}
|
||||
core/scene_view.h
|
||||
core/texture.cc
|
||||
core/texture.h
|
||||
core/types.h
|
||||
support/filament_util.h
|
||||
support/filament_util.cc
|
||||
support/light_manager.h
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <utils/Entity.h>
|
||||
#include <mujoco/mjrfilament.h>
|
||||
#include <mujoco/mujoco.h>
|
||||
#include "render/filament/core/types.h"
|
||||
|
||||
namespace mujoco {
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <filament/VertexBuffer.h>
|
||||
#include <math/vec4.h>
|
||||
#include <mujoco/mjrfilament.h>
|
||||
#include "render/filament/core/types.h"
|
||||
|
||||
namespace mujoco {
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <filament/Texture.h>
|
||||
#include <mujoco/mjrfilament.h>
|
||||
#include "render/filament/core/texture.h"
|
||||
#include "render/filament/core/types.h"
|
||||
|
||||
namespace mujoco {
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include "render/filament/core/material_manager.h"
|
||||
#include "render/filament/core/mesh.h"
|
||||
#include "render/filament/core/reflection_manager.h"
|
||||
#include "render/filament/core/types.h"
|
||||
|
||||
namespace mujoco {
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "render/filament/core/reflection_manager.h"
|
||||
#include "render/filament/core/renderable.h"
|
||||
#include "render/filament/core/texture.h"
|
||||
#include "render/filament/core/types.h"
|
||||
|
||||
namespace mujoco {
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <filament/Texture.h>
|
||||
#include <math/vec3.h>
|
||||
#include <mujoco/mjrfilament.h>
|
||||
#include "render/filament/core/types.h"
|
||||
|
||||
// Functions for creating filament textures.
|
||||
namespace mujoco {
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
// Copyright 2026 DeepMind Technologies Limited
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#ifndef MUJOCO_SRC_RENDER_FILAMENT_CORE_TYPES_H_
|
||||
#define MUJOCO_SRC_RENDER_FILAMENT_CORE_TYPES_H_
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// These types are only forward declared in the API. We define them concretely
|
||||
// here to allow us to use them in the core classes.
|
||||
struct mjrfContext_ {};
|
||||
struct mjrfTexture_ {};
|
||||
struct mjrfMesh_ {};
|
||||
struct mjrfScene_ {};
|
||||
struct mjrfLight_ {};
|
||||
struct mjrfRenderable_ {};
|
||||
struct mjrfRenderTarget_ {};
|
||||
|
||||
#if defined(__cplusplus)
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // MUJOCO_SRC_RENDER_FILAMENT_CORE_TYPES_H_
|
||||
Reference in New Issue
Block a user