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/src/sculptmode.c')
-rw-r--r--source/blender/src/sculptmode.c33
1 files changed, 17 insertions, 16 deletions
diff --git a/source/blender/src/sculptmode.c b/source/blender/src/sculptmode.c
index 9b358ee6f21..4e740c34af5 100644
--- a/source/blender/src/sculptmode.c
+++ b/source/blender/src/sculptmode.c
@@ -83,7 +83,6 @@
#include "BIF_space.h"
#include "BIF_toolbox.h"
-#include "BDR_drawobject.h"
#include "BDR_sculptmode.h"
#include "BSE_drawview.h"
@@ -98,6 +97,8 @@
#include "RE_render_ext.h"
#include "RE_shader_ext.h" /*for multitex_ext*/
+#include "GPU_draw.h"
+
#include <math.h>
#include <stdlib.h>
#include <string.h>
@@ -184,9 +185,9 @@ SculptData *sculpt_data(void)
return &G.scene->sculptdata;
}
-void sculpt_init_session(void);
-void init_brushaction(BrushAction *a, short *, short *);
-void sculpt_undo_push(const short);
+static void sculpt_init_session(void);
+static void init_brushaction(BrushAction *a, short *, short *);
+static void sculpt_undo_push(const short);
SculptSession *sculpt_session(void)
{
@@ -200,7 +201,7 @@ SculptSession *sculpt_session(void)
* Allocate/initialize/free data
*/
-void sculpt_init_session(void)
+static void sculpt_init_session(void)
{
if(sculpt_data()->session)
sculptsession_free(G.scene);
@@ -209,7 +210,7 @@ void sculpt_init_session(void)
/* vertex_users is an array of Lists that store all the faces that use a
particular vertex. vertex_users is in the same order as mesh.mvert */
-void calc_vertex_users()
+static void calc_vertex_users()
{
SculptSession *ss= sculpt_session();
int i,j;
@@ -846,14 +847,14 @@ float tex_strength(BrushAction *a, float *point, const float len,const unsigned
float fy= point_2d[1];
float angle= atan2(fy, fx) - rot;
- float len= sqrtf(fx*fx + fy*fy);
+ float flen= sqrtf(fx*fx + fy*fy);
if(rot<0.001 && rot>-0.001) {
px= point_2d[0];
py= point_2d[1];
} else {
- px= len * cos(angle) + 2000;
- py= len * sin(angle) + 2000;
+ px= flen * cos(angle) + 2000;
+ py= flen * sin(angle) + 2000;
}
if(sx != 1)
px %= sx-1;
@@ -865,10 +866,10 @@ float tex_strength(BrushAction *a, float *point, const float len,const unsigned
float fy= (point_2d[1] - a->mouse[1]) / bsize;
float angle= atan2(fy, fx) - rot;
- float len= sqrtf(fx*fx + fy*fy);
+ float flen= sqrtf(fx*fx + fy*fy);
- fx = len * cos(angle) + 0.5;
- fy = len * sin(angle) + 0.5;
+ fx = flen * cos(angle) + 0.5;
+ fy = flen * sin(angle) + 0.5;
avg= get_texcache_pixel_bilinear(ss, fx * TC_SIZE, fy * TC_SIZE);
}
@@ -1210,7 +1211,7 @@ void sculptmode_update_tex()
}
/* pr_mouse is only used for the grab brush, can be NULL otherwise */
-void init_brushaction(BrushAction *a, short *mouse, short *pr_mouse)
+static void init_brushaction(BrushAction *a, short *mouse, short *pr_mouse)
{
SculptData *sd = sculpt_data();
SculptSession *ss = sculpt_session();
@@ -1553,7 +1554,7 @@ void sculptmode_draw_mesh(int only_damaged)
mymultmatrix(OBACT->obmat);
glEnable(GL_DEPTH_TEST);
glEnable(GL_LIGHTING);
- init_gl_materials(OBACT, 0);
+ GPU_set_object_materials(G.scene, OBACT, 0, NULL);
glEnable(GL_CULL_FACE);
glShadeModel(GL_SMOOTH);
@@ -1571,7 +1572,7 @@ void sculptmode_draw_mesh(int only_damaged)
int new_matnr= f->mat_nr + 1;
if(new_matnr != matnr)
- drawCurrentMat= set_gl_material(matnr = new_matnr);
+ drawCurrentMat= GPU_enable_material(matnr = new_matnr, NULL);
/* If only_damaged!=0, only draw faces that are partially
inside the area(s) modified by the brush */
@@ -1847,7 +1848,7 @@ void sculpt(void)
allqueue(REDRAWVIEW3D, 0);
}
-void sculpt_undo_push(const short brush_type)
+static void sculpt_undo_push(const short brush_type)
{
switch(brush_type) {
case DRAW_BRUSH: