Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/render/gpu_display.h
| Show First 20 Lines • Show All 84 Lines • ▼ Show 20 Lines | public: | ||||
| * | * | ||||
| * If false is returned then no update is possible, and no update_end() call is needed. | * If false is returned then no update is possible, and no update_end() call is needed. | ||||
| * | * | ||||
| * The texture width and height denotes an actual resolution of the underlying render result. */ | * The texture width and height denotes an actual resolution of the underlying render result. */ | ||||
| bool update_begin(int texture_width, int texture_height); | bool update_begin(int texture_width, int texture_height); | ||||
| void update_end(); | void update_end(); | ||||
| /* Get currently configured texture size of the display (as configured by `update_begin()`. */ | |||||
| int2 get_texture_size() const; | |||||
| /* -------------------------------------------------------------------- | /* -------------------------------------------------------------------- | ||||
| * Texture update from CPU buffer. | * Texture update from CPU buffer. | ||||
| * | * | ||||
| * NOTE: The GPUDisplay should be marked for an update being in process with `update_begin()`. | * NOTE: The GPUDisplay should be marked for an update being in process with `update_begin()`. | ||||
| * | * | ||||
| * Most portable implementation, which must be supported by all platforms. Might not be the most | * Most portable implementation, which must be supported by all platforms. Might not be the most | ||||
| * efficient one. | * efficient one. | ||||
| */ | */ | ||||
| ▲ Show 20 Lines • Show All 102 Lines • ▼ Show 20 Lines | struct { | ||||
| * However, if only navigation or object in scene did change, then the outdated state of the | * 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 | * texture is still usable for draw, preventing display viewport flickering on navigation and | ||||
| * object modifications. */ | * object modifications. */ | ||||
| bool is_usable = false; | 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. */ | |||||
| 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 | ||||