Skip to content

Commit

Permalink
RenderContext: Add missing properties. (#30286)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mugen87 authored Jan 8, 2025
1 parent f2cf01c commit 9ddf4be
Showing 1 changed file with 29 additions and 3 deletions.
32 changes: 29 additions & 3 deletions src/renderers/common/RenderContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,14 @@ class RenderContext {
*/
this.scissorValue = new Vector4();

/**
* The active render target.
*
* @type {RenderTarget?}
* @default null
*/
this.renderTarget = null;

/**
* The textures of the active render target.
* `null` when no render target is set.
Expand Down Expand Up @@ -167,21 +175,37 @@ class RenderContext {
this.sampleCount = 1;

/**
* The framebuffers width in physical pixels.
* The active render target's width in physical pixels.
*
* @type {Number}
* @default 0
*/
this.width = 0;

/**
* The framebuffers height in physical pixels.
* The active render target's height in physical pixels.
*
* @type {Number}
* @default 0
*/
this.height = 0;

/**
* The occlusion query count.
*
* @type {Number}
* @default 0
*/
this.occlusionQueryCount = 0;

/**
* The current clipping context.
*
* @type {ClippingContext?}
* @default null
*/
this.clippingContext = null;

/**
* This flag can be used for type testing.
*
Expand All @@ -207,7 +231,9 @@ class RenderContext {
}

/**
* Computes a cache key for the given render context.
* Computes a cache key for the given render context. This cache
* should identify the render target state so it is possible to
* configure the correct attachments in the respective backend.
*
* @param {RenderContext} renderContext - The render context.
* @return {Number} The cache key.
Expand Down

0 comments on commit 9ddf4be

Please sign in to comment.