Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/draw/intern/draw_curves_private.h')
-rw-r--r--source/blender/draw/intern/draw_curves_private.h26
1 files changed, 15 insertions, 11 deletions
diff --git a/source/blender/draw/intern/draw_curves_private.h b/source/blender/draw/intern/draw_curves_private.h
index ed4dd50dfbe..26ecc4d9d12 100644
--- a/source/blender/draw/intern/draw_curves_private.h
+++ b/source/blender/draw/intern/draw_curves_private.h
@@ -35,22 +35,26 @@ typedef struct CurvesEvalFinalCache {
GPUVertBuf *proc_buf;
GPUTexture *proc_tex;
- /* Just contains a huge index buffer used to draw the final curves. */
+ /**Just contains a huge index buffer used to draw the final curves. */
GPUBatch *proc_hairs[MAX_THICKRES];
- /* Points per curve, at least 2. */
+ /** Points per curve, at least 2. */
int strands_res;
- /* Attributes currently being or about to be drawn. */
+ /** Attributes currently being drawn or about to be drawn. */
DRW_Attributes attr_used;
- /* Attributes which were used at some point. This is used for garbage collection, to remove
- * attributes which are not used in shaders anymore due to user edits. */
+ /**
+ * Attributes that were used at some point. This is used for garbage collection, to remove
+ * attributes that are not used in shaders anymore due to user edits.
+ */
DRW_Attributes attr_used_over_time;
- /* Last time, in seconds, the `attr_used` and `attr_used_over_time` were exactly the same.
+ /**
+ * The last time in seconds that the `attr_used` and `attr_used_over_time` were exactly the same.
* If the delta between this time and the current scene time is greater than the timeout set in
- * user preferences (`U.vbotimeout`) then garbage collection is performed. */
+ * user preferences (`U.vbotimeout`) then garbage collection is performed.
+ */
int last_attr_matching_time;
/* Output of the subdivision stage: vertex buffers sized to subdiv level. This is only attributes
@@ -61,7 +65,7 @@ typedef struct CurvesEvalFinalCache {
/* Curves procedural display: Evaluation is done on the GPU. */
typedef struct CurvesEvalCache {
- /* Input control points */
+ /* Input control point positions combined with parameter data. */
GPUVertBuf *proc_point_buf;
GPUTexture *point_tex;
@@ -78,8 +82,8 @@ typedef struct CurvesEvalCache {
CurvesEvalFinalCache final[MAX_HAIR_SUBDIV];
- /* For point attributes, which need subdivision, these are the input data.
- * For spline attributes, which need not subdivision, these are the final data. */
+ /* For point attributes, which need subdivision, these buffers contain the input data.
+ * For curve domain attributes, which do not need subdivision, these are the final data. */
GPUVertBuf *proc_attributes_buf[GPU_MAX_ATTR];
GPUTexture *proc_attributes_tex[GPU_MAX_ATTR];
@@ -89,7 +93,7 @@ typedef struct CurvesEvalCache {
} CurvesEvalCache;
/**
- * Ensure all textures and buffers needed for GPU accelerated drawing.
+ * Ensure all necessary textures and buffers exist for GPU accelerated drawing.
*/
bool curves_ensure_procedural_data(struct Object *object,
struct CurvesEvalCache **r_hair_cache,