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:
authorGeoffrey Bantle <hairbat@yahoo.com>2008-07-08 06:22:37 +0400
committerGeoffrey Bantle <hairbat@yahoo.com>2008-07-08 06:22:37 +0400
commit3185253a066053ba0ece547e4f17adcc152ddb71 (patch)
tree8c724d2e9d1cb34801aa0bc9ca08ae19de4f49c3 /source/blender/blenlib
parent1d822b1cda135652125c57edc29f4167f1980912 (diff)
-> UV and VCOL support for bevel (editmode)
BMesh and the bevel code now support UVs/VCOLS. The offset is fixed at this time, but will be made dynamic later.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/BLI_mempool.h4
-rw-r--r--source/blender/blenlib/intern/BLI_mempool.c13
2 files changed, 14 insertions, 3 deletions
diff --git a/source/blender/blenlib/BLI_mempool.h b/source/blender/blenlib/BLI_mempool.h
index a706e5f3874..8b31459dd38 100644
--- a/source/blender/blenlib/BLI_mempool.h
+++ b/source/blender/blenlib/BLI_mempool.h
@@ -36,7 +36,9 @@ typedef struct BLI_mempool BLI_mempool;
BLI_mempool *BLI_mempool_create(int esize, int tote, int pchunk);
void *BLI_mempool_alloc(BLI_mempool *pool);
+void *BLI_mempool_calloc(BLI_mempool *pool);
void BLI_mempool_free(BLI_mempool *pool, void *addr);
void BLI_mempool_destroy(BLI_mempool *pool);
-#endif \ No newline at end of file
+
+#endif
diff --git a/source/blender/blenlib/intern/BLI_mempool.c b/source/blender/blenlib/intern/BLI_mempool.c
index 7bbf0c4732e..7ac7b8b1791 100644
--- a/source/blender/blenlib/intern/BLI_mempool.c
+++ b/source/blender/blenlib/intern/BLI_mempool.c
@@ -89,7 +89,6 @@ BLI_mempool *BLI_mempool_create(int esize, int tote, int pchunk)
curnode->next = NULL;
return pool;
}
-
void *BLI_mempool_alloc(BLI_mempool *pool){
void *retval=NULL;
BLI_freenode *curnode=NULL;
@@ -117,6 +116,16 @@ void *BLI_mempool_alloc(BLI_mempool *pool){
//memset(retval, 0, pool->esize);
return retval;
}
+
+void *BLI_mempool_calloc(BLI_mempool *pool){
+ void *retval=NULL;
+ retval = BLI_mempool_alloc(pool);
+ memset(retval, 0, pool->esize);
+ return retval;
+}
+
+
+
void BLI_mempool_free(BLI_mempool *pool, void *addr){ //doesnt protect against double frees, dont be stupid!
BLI_freenode *newhead = addr;
newhead->next = pool->free;
@@ -128,4 +137,4 @@ void BLI_mempool_destroy(BLI_mempool *pool)
for(mpchunk = pool->chunks.first; mpchunk; mpchunk = mpchunk->next) MEM_freeN(mpchunk->data);
BLI_freelistN(&(pool->chunks));
MEM_freeN(pool);
-} \ No newline at end of file
+}