Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/integrator/path_trace_display.h
| Show All 10 Lines | |||||
| * distributed under the License is distributed on an "AS IS" BASIS, | * distributed under the License is distributed on an "AS IS" BASIS, | ||||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||
| * See the License for the specific language governing permissions and | * See the License for the specific language governing permissions and | ||||
| * limitations under the License. | * limitations under the License. | ||||
| */ | */ | ||||
| #pragma once | #pragma once | ||||
| #include "render/display_driver.h" | #include "session/display_driver.h" | ||||
| #include "util/util_half.h" | #include "util/half.h" | ||||
| #include "util/util_thread.h" | #include "util/thread.h" | ||||
| #include "util/util_types.h" | #include "util/types.h" | ||||
| #include "util/util_unique_ptr.h" | #include "util/unique_ptr.h" | ||||
| CCL_NAMESPACE_BEGIN | CCL_NAMESPACE_BEGIN | ||||
| class BufferParams; | class BufferParams; | ||||
| /* PathTraceDisplay is used for efficient render buffer display. | /* PathTraceDisplay is used for efficient render buffer display. | ||||
| * | * | ||||
| * The host applications implements a DisplayDriver, storing a render pass in a GPU-side | * The host applications implements a DisplayDriver, storing a render pass in a GPU-side | ||||
| ▲ Show 20 Lines • Show All 136 Lines • ▼ Show 20 Lines | private: | ||||
| struct { | struct { | ||||
| /* True when update is in process, indicated by `update_begin()` / `update_end()`. */ | /* True when update is in process, indicated by `update_begin()` / `update_end()`. */ | ||||
| bool is_active = false; | bool is_active = false; | ||||
| } update_state_; | } update_state_; | ||||
| /* State of the texture, which is needed for an integration with render session and interactive | /* State of the texture, which is needed for an integration with render session and interactive | ||||
| * updates and navigation. */ | * updates and navigation. */ | ||||
| struct { | struct { | ||||
| /* Denotes whether possibly existing state of GPU side texture is still usable. | |||||
| * It will not be usable in cases like render border did change (in this case we don't want | |||||
| * previous texture to be rendered at all). | |||||
| * | |||||
| * However, if only navigation or object in scene did change, then the outdated state of the | |||||
| * texture is still usable for draw, preventing display viewport flickering on navigation and | |||||
| * object modifications. */ | |||||
| bool is_usable = false; | |||||
| /* Texture is considered outdated after `reset()` until the next call of | /* Texture is considered outdated after `reset()` until the next call of | ||||
| * `copy_pixels_to_texture()`. */ | * `copy_pixels_to_texture()`. */ | ||||
| bool is_outdated = true; | bool is_outdated = true; | ||||
| /* Texture size in pixels. */ | /* Texture size in pixels. */ | ||||
| int2 size = make_int2(0, 0); | int2 size = make_int2(0, 0); | ||||
| } texture_state_; | } texture_state_; | ||||
| /* State of the texture buffer. Is tracked to perform sanity checks. */ | /* State of the texture buffer. Is tracked to perform sanity checks. */ | ||||
| struct { | struct { | ||||
| /* True when the texture buffer is mapped with `map_texture_buffer()`. */ | /* True when the texture buffer is mapped with `map_texture_buffer()`. */ | ||||
| bool is_mapped = false; | bool is_mapped = false; | ||||
| } texture_buffer_state_; | } texture_buffer_state_; | ||||
| }; | }; | ||||
| CCL_NAMESPACE_END | CCL_NAMESPACE_END | ||||