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:
authorClément Foucault <foucault.clem@gmail.com>2018-09-29 20:42:09 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-10-01 16:14:46 +0300
commit781995a09c0b52ad2fd073510c2f7dc52383d461 (patch)
treef821cce3fa5f69435a20e450d709fec37cb95b4a /source/blender/draw/intern/draw_cache_impl.h
parenta5101de6a95647d19821bde9f8d68776ce8881fa (diff)
Edit UVs: Refactor drawing Edit UV in Image Editor
NOTE: This commit only concern edit UVs and not the "shadow" mesh displayed when texture painting. This will be address in a future commit. We now cache the uv mesh in the mesh batch cache and only reupload data on changes. Update could be more granular (and a bit faster) but it's not our main concern ATM. This should fix problem caused by the IMM api used to draw large meshes. This makes performance skyrocket compared to previous implementation. There is still a big CPU bottleneck when not in sync selection mode but it is not related to the drawing function directly.
Diffstat (limited to 'source/blender/draw/intern/draw_cache_impl.h')
-rw-r--r--source/blender/draw/intern/draw_cache_impl.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/draw/intern/draw_cache_impl.h b/source/blender/draw/intern/draw_cache_impl.h
index 4bd0046a48a..9ce994adbc0 100644
--- a/source/blender/draw/intern/draw_cache_impl.h
+++ b/source/blender/draw/intern/draw_cache_impl.h
@@ -36,6 +36,7 @@ struct ListBase;
struct ModifierData;
struct ParticleSystem;
struct PTCacheEdit;
+struct SpaceImage;
struct Curve;
struct Lattice;
@@ -156,6 +157,20 @@ void DRW_mesh_batch_cache_get_wireframes_face_texbuf(
void DRW_mesh_cache_sculpt_coords_ensure(struct Mesh *me);
+enum {
+ UVEDIT_EDGES = (1 << 0),
+ UVEDIT_DATA = (1 << 1),
+ UVEDIT_FACEDOTS = (1 << 2),
+ UVEDIT_FACES = (1 << 3),
+ UVEDIT_STRETCH_ANGLE = (1 << 4),
+ UVEDIT_STRETCH_AREA = (1 << 5),
+ UVEDIT_SYNC_SEL = (1 << 6),
+};
+
+void DRW_mesh_cache_uvedit(
+ struct Object *me, struct SpaceImage *sima, struct Scene *scene, uchar state,
+ struct GPUBatch **faces, struct GPUBatch **edges, struct GPUBatch **verts, struct GPUBatch **facedots);
+
/* Edit mesh bitflags (is this the right place?) */
enum {