Rename mjrRenderTargetConfig to mjrfRenderTargetConfig.
This rename was overlooked in the previous commit which updated the prefixes for all filament-specific render objects. PiperOrigin-RevId: 928710590 Change-Id: I0ff09cb077f7d5643371d43a43fc992352e6d85d
This commit is contained in:
committed by
Copybara-Service
parent
66c0131840
commit
ae2e8aa940
@@ -34,7 +34,7 @@ void ReflectionManager::ClearRenderables() {
|
||||
mjrfTexture* ReflectionManager::Register(mjrfRenderable* renderable, int width,
|
||||
int height) {
|
||||
if (targets_.size() == renderables_.size()) {
|
||||
mjrRenderTargetConfig config;
|
||||
mjrfRenderTargetConfig config;
|
||||
mjrf_defaultRenderTargetConfig(&config);
|
||||
config.color_format = mjPIXEL_FORMAT_RGBA8;
|
||||
config.depth_format = mjPIXEL_FORMAT_DEPTH32F;
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
namespace mujoco {
|
||||
|
||||
RenderTarget::RenderTarget(filament::Engine* engine,
|
||||
const mjrRenderTargetConfig& config)
|
||||
const mjrfRenderTargetConfig& config)
|
||||
: engine_(engine), config_(config) {
|
||||
if (config_.width > 0 && config_.height > 0) {
|
||||
Prepare(config_.width, config_.height);
|
||||
|
||||
@@ -31,7 +31,7 @@ class RenderTarget : public mjrfRenderTarget {
|
||||
public:
|
||||
// Defines the types of textures to create for the color and depth
|
||||
// attachments.
|
||||
RenderTarget(filament::Engine* engine, const mjrRenderTargetConfig& config);
|
||||
RenderTarget(filament::Engine* engine, const mjrfRenderTargetConfig& config);
|
||||
~RenderTarget() noexcept;
|
||||
|
||||
RenderTarget(const RenderTarget&) = delete;
|
||||
@@ -65,7 +65,7 @@ class RenderTarget : public mjrfRenderTarget {
|
||||
void Destroy();
|
||||
|
||||
filament::Engine* engine_ = nullptr;
|
||||
mjrRenderTargetConfig config_;
|
||||
mjrfRenderTargetConfig config_;
|
||||
filament::RenderTarget* render_target_ = nullptr;
|
||||
std::unique_ptr<Texture> color_texture_ = nullptr;
|
||||
std::unique_ptr<Texture> depth_texture_ = nullptr;
|
||||
|
||||
@@ -105,7 +105,7 @@ void CompatContext::ReadPixels(mjrRect viewport, unsigned char* rgb,
|
||||
}
|
||||
|
||||
if (rgb) {
|
||||
mjrRenderTargetConfig config;
|
||||
mjrfRenderTargetConfig config;
|
||||
mjrf_defaultRenderTargetConfig(&config);
|
||||
config.width = viewport.width;
|
||||
config.height = viewport.height;
|
||||
@@ -132,7 +132,7 @@ void CompatContext::ReadPixels(mjrRect viewport, unsigned char* rgb,
|
||||
}
|
||||
|
||||
if (depth) {
|
||||
mjrRenderTargetConfig config;
|
||||
mjrfRenderTargetConfig config;
|
||||
mjrf_defaultRenderTargetConfig(&config);
|
||||
config.width = viewport.width;
|
||||
config.height = viewport.height;
|
||||
|
||||
@@ -95,8 +95,8 @@ void mjrf_defaultRenderableParams(mjrfRenderableParams* params) {
|
||||
params->blend_order = 0;
|
||||
}
|
||||
|
||||
void mjrf_defaultRenderTargetConfig(mjrRenderTargetConfig* config) {
|
||||
memset(config, 0, sizeof(mjrRenderTargetConfig));
|
||||
void mjrf_defaultRenderTargetConfig(mjrfRenderTargetConfig* config) {
|
||||
memset(config, 0, sizeof(mjrfRenderTargetConfig));
|
||||
config->color_format = mjPIXEL_FORMAT_RGBA8;
|
||||
config->depth_format = mjPIXEL_FORMAT_DEPTH32F;
|
||||
}
|
||||
@@ -171,7 +171,7 @@ void mjrf_destroyRenderable(mjrfRenderable* renderable) {
|
||||
}
|
||||
|
||||
mjrfRenderTarget* mjrf_createRenderTarget(mjrfContext* ctx,
|
||||
const mjrRenderTargetConfig* config) {
|
||||
const mjrfRenderTargetConfig* config) {
|
||||
return new mujoco::RenderTarget(
|
||||
mujoco::FilamentContext::downcast(ctx)->GetEngine(), *config);
|
||||
}
|
||||
|
||||
@@ -732,7 +732,7 @@ void mjrf_setRenderableSize(mjrfRenderable* renderable, const float size[3]);
|
||||
// See mjrf_render for more details.
|
||||
|
||||
// Defines the basic properties of a render target.
|
||||
struct mjrRenderTargetConfig {
|
||||
struct mjrfRenderTargetConfig {
|
||||
// The width of the render target.
|
||||
int width;
|
||||
|
||||
@@ -747,11 +747,11 @@ struct mjrRenderTargetConfig {
|
||||
};
|
||||
|
||||
// Initializes the RenderTargetConfig to default values.
|
||||
void mjrf_defaultRenderTargetConfig(mjrRenderTargetConfig* config);
|
||||
void mjrf_defaultRenderTargetConfig(mjrfRenderTargetConfig* config);
|
||||
|
||||
// Creates a render target for the filament renderer.
|
||||
mjrfRenderTarget* mjrf_createRenderTarget(mjrfContext* ctx,
|
||||
const mjrRenderTargetConfig* config);
|
||||
const mjrfRenderTargetConfig* config);
|
||||
|
||||
// Destroys the render target.
|
||||
void mjrf_destroyRenderTarget(mjrfRenderTarget* render_target);
|
||||
|
||||
@@ -62,7 +62,7 @@ inline UniquePtr<mjrfRenderable> CreateRenderable(
|
||||
}
|
||||
|
||||
inline UniquePtr<mjrfRenderTarget> CreateRenderTarget(
|
||||
mjrfContext* ctx, const mjrRenderTargetConfig& config) {
|
||||
mjrfContext* ctx, const mjrfRenderTargetConfig& config) {
|
||||
mjrfRenderTarget* render_target = mjrf_createRenderTarget(ctx, &config);
|
||||
return UniquePtr<mjrfRenderTarget>(render_target, mjrf_destroyRenderTarget);
|
||||
}
|
||||
|
||||
@@ -298,7 +298,7 @@ void Renderer::DoReadPixels(int width, int height, unsigned char* rgb) {
|
||||
draw_mode = mjDRAW_MODE_WIREFRAME;
|
||||
}
|
||||
|
||||
mjrRenderTargetConfig config;
|
||||
mjrfRenderTargetConfig config;
|
||||
mjrf_defaultRenderTargetConfig(&config);
|
||||
config.width = viewport.width;
|
||||
config.height = viewport.height;
|
||||
|
||||
Reference in New Issue
Block a user