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:
authorKen Hughes <khughes@pacific.edu>2007-03-17 17:15:02 +0300
committerKen Hughes <khughes@pacific.edu>2007-03-17 17:15:02 +0300
commit4e72e4ad2bf39bc9bb4209b4b2d0fae99127a3d9 (patch)
treea166660c3dcb8ce0db3d2a7230bcc6b75987bcae
parentbd04d2346559c7a02883ff5ed62b0f4171dbe941 (diff)
Fix various gcc warning related to signed/unsigned parameters passed to
OpenGL functions.
-rw-r--r--source/blender/src/drawarmature.c8
-rw-r--r--source/blender/src/drawimage.c6
-rw-r--r--source/blender/src/drawobject.c18
-rw-r--r--source/blender/src/drawseq.c20
-rw-r--r--source/blender/src/drawview.c18
-rw-r--r--source/blender/src/glutil.c2
-rw-r--r--source/blender/src/interface_draw.c8
-rw-r--r--source/blender/src/outliner.c4
-rwxr-xr-xsource/blender/src/transform_constraints.c2
-rwxr-xr-xsource/blender/src/transform_generics.c2
10 files changed, 44 insertions, 44 deletions
diff --git a/source/blender/src/drawarmature.c b/source/blender/src/drawarmature.c
index 864e0dd397e..6d3a6360989 100644
--- a/source/blender/src/drawarmature.c
+++ b/source/blender/src/drawarmature.c
@@ -759,11 +759,11 @@ static void draw_sphere_bone(int dt, int armflag, int boneflag, int constflag, u
gluDeleteQuadric(qobj);
}
-static char bm_dot6[]= {0x0, 0x18, 0x3C, 0x7E, 0x7E, 0x3C, 0x18, 0x0};
-static char bm_dot8[]= {0x3C, 0x7E, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x3C};
+static GLubyte bm_dot6[]= {0x0, 0x18, 0x3C, 0x7E, 0x7E, 0x3C, 0x18, 0x0};
+static GLubyte bm_dot8[]= {0x3C, 0x7E, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x3C};
-static char bm_dot5[]= {0x0, 0x0, 0x10, 0x38, 0x7c, 0x38, 0x10, 0x0};
-static char bm_dot7[]= {0x0, 0x38, 0x7C, 0xFE, 0xFE, 0xFE, 0x7C, 0x38};
+static GLubyte bm_dot5[]= {0x0, 0x0, 0x10, 0x38, 0x7c, 0x38, 0x10, 0x0};
+static GLubyte bm_dot7[]= {0x0, 0x38, 0x7C, 0xFE, 0xFE, 0xFE, 0x7C, 0x38};
static void draw_line_bone(int armflag, int boneflag, int constflag, unsigned int id, bPoseChannel *pchan, EditBone *ebone)
diff --git a/source/blender/src/drawimage.c b/source/blender/src/drawimage.c
index 63e5031070b..fc4d528e45e 100644
--- a/source/blender/src/drawimage.c
+++ b/source/blender/src/drawimage.c
@@ -456,9 +456,9 @@ void draw_tfaces(void)
if(tface->flag & TF_SELECT) {
if(!(~tface->flag & (TF_SEL1|TF_SEL2|TF_SEL3)) &&
(!mface->v4 || tface->flag & TF_SEL4))
- glColor4ubv(col2);
+ glColor4ubv((GLubyte *)col2);
else
- glColor4ubv(col1);
+ glColor4ubv((GLubyte *)col1);
glBegin(mface->v4?GL_QUADS:GL_TRIANGLES);
glVertex2fv(tface->uv[0]);
@@ -2037,7 +2037,7 @@ static void imagewindow_progress(ScrArea *sa, RenderResult *rr, volatile rcti *r
rectf= rr->rectf;
else {
if(rr->rect32)
- rect32= rr->rect32;
+ rect32= (unsigned int *)rr->rect32;
else {
if(rr->renlay==NULL || rr->renlay->rectf==NULL) return;
rectf= rr->renlay->rectf;
diff --git a/source/blender/src/drawobject.c b/source/blender/src/drawobject.c
index 5bad88051e6..30786f8b2f5 100644
--- a/source/blender/src/drawobject.c
+++ b/source/blender/src/drawobject.c
@@ -1519,13 +1519,13 @@ static void draw_em_fancy_verts(EditMesh *em, DerivedMesh *cageDM)
if(G.scene->selectmode & SCE_SELECT_VERTEX) {
glPointSize(size);
- glColor4ubv(col);
+ glColor4ubv((GLubyte *)col);
draw_dm_verts(cageDM, sel);
}
if(G.scene->selectmode & SCE_SELECT_FACE) {
glPointSize(fsize);
- glColor4ubv(fcol);
+ glColor4ubv((GLubyte *)fcol);
draw_dm_face_centers(cageDM, sel);
}
@@ -1543,11 +1543,11 @@ static void draw_em_fancy_verts(EditMesh *em, DerivedMesh *cageDM)
static void draw_em_fancy_edges(DerivedMesh *cageDM)
{
int pass;
- char wire[4], sel[4];
+ unsigned char wire[4], sel[4];
/* since this function does transparant... */
- BIF_GetThemeColor3ubv(TH_EDGE_SELECT, sel);
- BIF_GetThemeColor3ubv(TH_WIRE, wire);
+ BIF_GetThemeColor3ubv(TH_EDGE_SELECT, (char *)sel);
+ BIF_GetThemeColor3ubv(TH_WIRE, (char *)wire);
for (pass=0; pass<2; pass++) {
/* show wires in transparant when no zbuf clipping for select */
@@ -1861,10 +1861,10 @@ static void draw_em_fancy(Object *ob, EditMesh *em, DerivedMesh *cageDM, Derived
}
if((G.f & (G_FACESELECT+G_DRAWFACES))) { /* transp faces */
- char col1[4], col2[4];
+ unsigned char col1[4], col2[4];
- BIF_GetThemeColor4ubv(TH_FACE, col1);
- BIF_GetThemeColor4ubv(TH_FACE_SELECT, col2);
+ BIF_GetThemeColor4ubv(TH_FACE, (char *)col1);
+ BIF_GetThemeColor4ubv(TH_FACE_SELECT, (char *)col2);
glEnable(GL_BLEND);
glDepthMask(0); // disable write in zbuffer, needed for nice transp
@@ -4187,7 +4187,7 @@ void draw_object(Base *base, int flag)
BIF_GetThemeColor3ubv(TH_GRID, col);
make_axis_color(col, col2, 'z');
- glColor3ubv(col2);
+ glColor3ubv((GLubyte *)col2);
for (curcon = list->first; curcon; curcon=curcon->next){
if ((curcon->flag & CONSTRAINT_EXPAND)&&(curcon->type!=CONSTRAINT_TYPE_NULL)&&(constraint_has_target(curcon))){
diff --git a/source/blender/src/drawseq.c b/source/blender/src/drawseq.c
index 821cbbc4d45..74b51655271 100644
--- a/source/blender/src/drawseq.c
+++ b/source/blender/src/drawseq.c
@@ -251,12 +251,12 @@ static void drawmeta_contents(Sequence *seqm, float x1, float y1, float x2, floa
WHILE_SEQ(&seqm->seqbase) {
get_seq_color3ubv(seq, col);
- glColor3ubv(col);
+ glColor3ubv((GLubyte *)col);
glRectf(x1, y1, x1+0.9*dx, y2);
BIF_GetColorPtrBlendShade3ubv(col, col, col, 0.0, -30);
- glColor3ubv(col);
+ glColor3ubv((GLubyte *)col);
fdrawbox(x1, y1, x1+0.9*dx, y2);
@@ -521,7 +521,7 @@ static void draw_seq_extensions(Sequence *seq, SpaceSeq *sseq)
if(seq->startstill) {
get_seq_color3ubv(seq, col);
BIF_GetColorPtrBlendShade3ubv(col, blendcol, col, 0.75, 40);
- glColor3ubv(col);
+ glColor3ubv((GLubyte *)col);
draw_shadedstrip(seq, col, x1, y1, (float)(seq->start), y2);
@@ -530,7 +530,7 @@ static void draw_seq_extensions(Sequence *seq, SpaceSeq *sseq)
if (seq->flag & SELECT) BIF_GetColorPtrBlendShade3ubv(col, col, col, 0.0, 24);
else BIF_GetColorPtrBlendShade3ubv(col, col, col, 0.0, -16);
- glColor3ubv(col);
+ glColor3ubv((GLubyte *)col);
for(a=y1; a< y2; a+= pixely*2.0 ) {
fdrawline(x1, a, (float)(seq->start), a);
@@ -539,7 +539,7 @@ static void draw_seq_extensions(Sequence *seq, SpaceSeq *sseq)
if(seq->endstill) {
get_seq_color3ubv(seq, col);
BIF_GetColorPtrBlendShade3ubv(col, blendcol, col, 0.75, 40);
- glColor3ubv(col);
+ glColor3ubv((GLubyte *)col);
draw_shadedstrip(seq, col, (float)(seq->start+seq->len), y1, x2, y2);
@@ -548,7 +548,7 @@ static void draw_seq_extensions(Sequence *seq, SpaceSeq *sseq)
if (seq->flag & SELECT) BIF_GetColorPtrBlendShade3ubv(col, col, col, 0.0, 24);
else BIF_GetColorPtrBlendShade3ubv(col, col, col, 0.0, -16);
- glColor3ubv(col);
+ glColor3ubv((GLubyte *)col);
for(a=y1; a< y2; a+= pixely*2.0 ) {
fdrawline((float)(seq->start+seq->len), a, x2, a);
@@ -643,7 +643,7 @@ static void draw_shadedstrip(Sequence *seq, char *col, float x1, float y1, float
if(seq->flag & SELECT) BIF_GetColorPtrBlendShade3ubv(col, col, col, 0.0, -50);
else BIF_GetColorPtrBlendShade3ubv(col, col, col, 0.0, 0);
- glColor3ubv(col);
+ glColor3ubv((GLubyte *)col);
glVertex2f(x1,y1);
glVertex2f(x2,y1);
@@ -651,7 +651,7 @@ static void draw_shadedstrip(Sequence *seq, char *col, float x1, float y1, float
if(seq->flag & SELECT) BIF_GetColorPtrBlendShade3ubv(col, col, col, 0.0, 5);
else BIF_GetColorPtrBlendShade3ubv(col, col, col, 0.0, -5);
- glColor3ubv(col);
+ glColor3ubv((GLubyte *)col);
glVertex2f(x2,ymid1);
glVertex2f(x1,ymid1);
@@ -668,7 +668,7 @@ static void draw_shadedstrip(Sequence *seq, char *col, float x1, float y1, float
if(seq->flag & SELECT) BIF_GetColorPtrBlendShade3ubv(col, col, col, 0.0, -15);
else BIF_GetColorPtrBlendShade3ubv(col, col, col, 0.0, 25);
- glColor3ubv(col);
+ glColor3ubv((GLubyte *)col);
glVertex2f(x2,y2);
glVertex2f(x1,y2);
@@ -723,7 +723,7 @@ static void draw_seq_strip(Sequence *seq, ScrArea *sa, SpaceSeq *sseq)
else if (seq->flag & SELECT) BIF_GetColorPtrBlendShade3ubv(col, col, col, 0.0, -150);
else BIF_GetColorPtrBlendShade3ubv(col, col, col, 0.0, -60);
- glColor3ubv(col);
+ glColor3ubv((GLubyte *)col);
gl_round_box_shade(GL_LINE_LOOP, x1, y1, x2, y2, 0.0, 0.1, 0.0);
diff --git a/source/blender/src/drawview.c b/source/blender/src/drawview.c
index 0a20a75ce88..ab317ce4826 100644
--- a/source/blender/src/drawview.c
+++ b/source/blender/src/drawview.c
@@ -612,13 +612,13 @@ static void drawgrid(void)
/* center cross */
if(G.vd->view==3) make_axis_color(col, col2, 'y');
else make_axis_color(col, col2, 'x');
- glColor3ubv(col2);
+ glColor3ubv((GLubyte *)col2);
fdrawline(0.0, y, (float)curarea->winx, y);
if(G.vd->view==7) make_axis_color(col, col2, 'y');
else make_axis_color(col, col2, 'z');
- glColor3ubv(col2);
+ glColor3ubv((GLubyte *)col2);
fdrawline(x, 0.0, x, (float)curarea->winy);
@@ -662,7 +662,7 @@ static void drawfloor(void)
/* check for the 'show Y axis' preference */
if (vd->gridflag & V3D_SHOW_Y) {
make_axis_color(col, col2, 'y');
- glColor3ubv(col2);
+ glColor3ubv((GLubyte *)col2);
draw_line = 1;
} else if (vd->gridflag & V3D_SHOW_FLOOR) {
@@ -701,7 +701,7 @@ static void drawfloor(void)
/* check for the 'show X axis' preference */
if (vd->gridflag & V3D_SHOW_X) {
make_axis_color(col, col2, 'x');
- glColor3ubv(col2);
+ glColor3ubv((GLubyte *)col2);
draw_line = 1;
} else if (vd->gridflag & V3D_SHOW_FLOOR) {
@@ -738,7 +738,7 @@ static void drawfloor(void)
/* check for the 'show Z axis' preference */
if (vd->gridflag & V3D_SHOW_Z) {
make_axis_color(col, col2, 'z');
- glColor3ubv(col2);
+ glColor3ubv((GLubyte *)col2);
glBegin(GL_LINE_STRIP);
vert[0]= 0;
@@ -1372,14 +1372,14 @@ static void draw_view_axis(void)
float dx, dy;
float h, s, v;
- BIF_GetThemeColor3ubv(TH_GRID, gridcol);
+ BIF_GetThemeColor3ubv(TH_GRID, (char *)gridcol);
/* X */
vec[0] = vec[3] = 1;
vec[1] = vec[2] = 0;
QuatMulVecf(G.vd->viewquat, vec);
- make_axis_color(gridcol, col, 'x');
+ make_axis_color((char *)gridcol, (char *)col, 'x');
rgb_to_hsv(col[0]/255.0f, col[1]/255.0f, col[2]/255.0f, &h, &s, &v);
s = s<0.5 ? s+0.5 : 1.0;
v = 0.3;
@@ -1400,7 +1400,7 @@ static void draw_view_axis(void)
vec[0] = vec[2] = 0;
QuatMulVecf(G.vd->viewquat, vec);
- make_axis_color(gridcol, col, 'y');
+ make_axis_color((char *)gridcol, (char *)col, 'y');
rgb_to_hsv(col[0]/255.0f, col[1]/255.0f, col[2]/255.0f, &h, &s, &v);
s = s<0.5 ? s+0.5 : 1.0;
v = 0.3;
@@ -1421,7 +1421,7 @@ static void draw_view_axis(void)
vec[1] = vec[0] = 0;
QuatMulVecf(G.vd->viewquat, vec);
- make_axis_color(gridcol, col, 'z');
+ make_axis_color((char *)gridcol, (char *)col, 'z');
rgb_to_hsv(col[0]/255.0f, col[1]/255.0f, col[2]/255.0f, &h, &s, &v);
s = s<0.5 ? s+0.5 : 1.0;
v = 0.5;
diff --git a/source/blender/src/glutil.c b/source/blender/src/glutil.c
index eddfa32739f..248d36dcb1e 100644
--- a/source/blender/src/glutil.c
+++ b/source/blender/src/glutil.c
@@ -232,7 +232,7 @@ static int get_cached_work_texture(int *w_r, int *h_r)
GLint ltexid= glaGetOneInteger(GL_TEXTURE_2D);
unsigned char *tbuf;
- glGenTextures(1, &texid);
+ glGenTextures(1, (GLuint *)&texid);
glBindTexture(GL_TEXTURE_2D, texid);
diff --git a/source/blender/src/interface_draw.c b/source/blender/src/interface_draw.c
index e979d4453cb..3c67975e96f 100644
--- a/source/blender/src/interface_draw.c
+++ b/source/blender/src/interface_draw.c
@@ -1086,11 +1086,11 @@ static void round_button(float x1, float y1, float x2, float y2, float asp,
if(col[1]<100) col[1]= 0; else col[1]-= 100;
if(col[2]<100) col[2]= 0; else col[2]-= 100;
col[3]= 80;
- glColor4ubv(col);
+ glColor4ubv((GLubyte *)col);
gl_round_box(GL_LINE_LOOP, x1, y1, x2, y2, rad - asp);
gl_round_box(GL_LINE_LOOP, x1, y1, x2, y2, rad + asp);
col[3]= 180;
- glColor4ubv(col);
+ glColor4ubv((GLubyte *)col);
gl_round_box(GL_LINE_LOOP, x1, y1, x2, y2, rad);
glDisable( GL_BLEND );
@@ -1384,11 +1384,11 @@ void uiDrawMenuBox(float minx, float miny, float maxx, float maxy, short flag)
ui_shadowbox(minx, miny, maxx, maxy, 2.0, (100*col[3])>>8);
glEnable(GL_BLEND);
- glColor4ubv(col);
+ glColor4ubv((GLubyte *)col);
glRectf(minx-1, miny, minx, maxy); // 1 pixel on left, to distinguish sublevel menus
}
glEnable(GL_BLEND);
- glColor4ubv(col);
+ glColor4ubv((GLubyte *)col);
glRectf(minx, miny, maxx, maxy);
glDisable(GL_BLEND);
}
diff --git a/source/blender/src/outliner.c b/source/blender/src/outliner.c
index 6b777377a0f..d2cd8eb002c 100644
--- a/source/blender/src/outliner.c
+++ b/source/blender/src/outliner.c
@@ -1,5 +1,5 @@
/**
- * $Id:
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -2949,7 +2949,7 @@ static void outliner_draw_tree_element(SpaceOops *soops, TreeElement *te, int st
}
else BIF_GetThemeColorType4ubv(TH_SELECT, SPACE_VIEW3D, col);
col[3]= 100;
- glColor4ubv(col);
+ glColor4ubv((GLubyte *)col);
}
#ifdef WITH_VERSE
diff --git a/source/blender/src/transform_constraints.c b/source/blender/src/transform_constraints.c
index f67b3acff3a..dbf539a1740 100755
--- a/source/blender/src/transform_constraints.c
+++ b/source/blender/src/transform_constraints.c
@@ -663,7 +663,7 @@ void BIF_drawConstraint(void)
drawLine(tc->center, tc->mtx[1], 'y', 0);
drawLine(tc->center, tc->mtx[2], 'z', 0);
- glColor3ubv(col2);
+ glColor3ubv((GLubyte *)col2);
glDisable(GL_DEPTH_TEST);
setlinestyle(1);
diff --git a/source/blender/src/transform_generics.c b/source/blender/src/transform_generics.c
index 1574a498cf9..10e1e8a704c 100755
--- a/source/blender/src/transform_generics.c
+++ b/source/blender/src/transform_generics.c
@@ -430,7 +430,7 @@ void drawLine(float *center, float *dir, char axis, short options)
BIF_GetThemeColor3ubv(TH_GRID, col);
}
make_axis_color(col, col2, axis);
- glColor3ubv(col2);
+ glColor3ubv((GLubyte *)col2);
setlinestyle(0);
glBegin(GL_LINE_STRIP);