fixed some tinygl warnings
This commit is contained in:
parent
c65fbae3b4
commit
b47eb161c5
10 changed files with 30 additions and 32 deletions
|
@ -50,7 +50,7 @@ void gl_transform_to_viewport(GLContext *c,GLVertex *v)
|
|||
|
||||
static void gl_add_select1(GLContext *c,int z1,int z2,int z3)
|
||||
{
|
||||
unsigned int min,max;
|
||||
int min,max;
|
||||
min=max=z1;
|
||||
if (z2<min) min=z2;
|
||||
if (z3<min) min=z3;
|
||||
|
|
|
@ -36,7 +36,7 @@ void glopMaterial(GLContext *c,TGLParam *p)
|
|||
break;
|
||||
case TGL_SHININESS:
|
||||
m->shininess=v[0];
|
||||
m->shininess_i = (v[0]/128.0f)*SPECULAR_BUFFER_RESOLUTION;
|
||||
m->shininess_i = (int)(v[0]/128.0f)*SPECULAR_BUFFER_RESOLUTION;
|
||||
break;
|
||||
case TGL_AMBIENT_AND_DIFFUSE:
|
||||
for(i=0;i<4;i++)
|
||||
|
|
|
@ -150,13 +150,13 @@ void gl_add_op(TGLParam *p)
|
|||
}
|
||||
|
||||
/* this opcode is never called directly */
|
||||
void glopEndList(GLContext *c,TGLParam *p)
|
||||
void glopEndList(GLContext *,TGLParam *)
|
||||
{
|
||||
assert(0);
|
||||
}
|
||||
|
||||
/* this opcode is never called directly */
|
||||
void glopNextBuffer(GLContext *c,TGLParam *p)
|
||||
void glopNextBuffer(GLContext *,TGLParam *)
|
||||
{
|
||||
assert(0);
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ void glopLoadMatrix(GLContext *c,TGLParam *p)
|
|||
gl_matrix_update(c);
|
||||
}
|
||||
|
||||
void glopLoadIdentity(GLContext *c,TGLParam *p)
|
||||
void glopLoadIdentity(GLContext *c,TGLParam *)
|
||||
{
|
||||
|
||||
gl_M4_Id(c->matrix_stack_ptr[c->matrix_mode]);
|
||||
|
@ -84,7 +84,7 @@ void glopMultMatrix(GLContext *c,TGLParam *p)
|
|||
}
|
||||
|
||||
|
||||
void glopPushMatrix(GLContext *c,TGLParam *p)
|
||||
void glopPushMatrix(GLContext *c,TGLParam *)
|
||||
{
|
||||
int n=c->matrix_mode;
|
||||
M4 *m;
|
||||
|
@ -99,7 +99,7 @@ void glopPushMatrix(GLContext *c,TGLParam *p)
|
|||
gl_matrix_update(c);
|
||||
}
|
||||
|
||||
void glopPopMatrix(GLContext *c,TGLParam *p)
|
||||
void glopPopMatrix(GLContext *c,TGLParam *)
|
||||
{
|
||||
int n=c->matrix_mode;
|
||||
|
||||
|
|
|
@ -129,14 +129,9 @@ void glopPolygonMode(GLContext *c,TGLParam *p)
|
|||
}
|
||||
}
|
||||
|
||||
void glopHint(GLContext *c,TGLParam *p)
|
||||
void glopHint(GLContext *,TGLParam *)
|
||||
{
|
||||
#if 0
|
||||
int target=p[1].i;
|
||||
int mode=p[2].i;
|
||||
|
||||
/* do nothing */
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -11,42 +11,45 @@
|
|||
happens (which might be an indication of an error). *Don't* use it
|
||||
when there's internal errors in the code - these should be handled
|
||||
by asserts. */
|
||||
void
|
||||
tgl_warning(const char *format, ...)
|
||||
{
|
||||
#ifndef NO_DEBUG_OUTPUT
|
||||
void tgl_warning(const char *, ...) { }
|
||||
#else
|
||||
void tgl_warning(const char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, format);
|
||||
fprintf(stderr, "*WARNING* ");
|
||||
vfprintf(stderr, format, args);
|
||||
va_end(args);
|
||||
#endif /* !NO_DEBUG_OUTPUT */
|
||||
}
|
||||
#endif /* !NO_DEBUG_OUTPUT */
|
||||
|
||||
/* This function should be used for debug output only. */
|
||||
void
|
||||
tgl_trace(const char *format, ...)
|
||||
{
|
||||
#ifndef NO_DEBUG_OUTPUT
|
||||
void tgl_trace(const char *, ...) { }
|
||||
#else
|
||||
void tgl_trace(const char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, format);
|
||||
fprintf(stderr, "*DEBUG* ");
|
||||
vfprintf(stderr, format, args);
|
||||
va_end(args);
|
||||
#endif /* !NO_DEBUG_OUTPUT */
|
||||
}
|
||||
#endif /* !NO_DEBUG_OUTPUT */
|
||||
|
||||
/* Use this function to output info about things in the code which
|
||||
should be fixed (missing handling of special cases, important
|
||||
features not implemented, known bugs/buglets, ...). */
|
||||
void
|
||||
tgl_fixme(const char *format, ...)
|
||||
{
|
||||
#ifndef NO_DEBUG_OUTPUT
|
||||
void tgl_fixme(const char *, ...) { }
|
||||
#else
|
||||
void tgl_fixme(const char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, format);
|
||||
fprintf(stderr, "*FIXME* ");
|
||||
vfprintf(stderr, format, args);
|
||||
va_end(args);
|
||||
#endif /* !NO_DEBUG_OUTPUT */
|
||||
}
|
||||
#endif /* !NO_DEBUG_OUTPUT */
|
||||
|
|
|
@ -50,7 +50,7 @@ void glSelectBuffer(int size,unsigned int *buf)
|
|||
}
|
||||
|
||||
|
||||
void glopInitNames(GLContext *c,TGLParam *p)
|
||||
void glopInitNames(GLContext *c,TGLParam *)
|
||||
{
|
||||
if (c->render_mode == TGL_SELECT) {
|
||||
c->name_stack_size=0;
|
||||
|
@ -67,7 +67,7 @@ void glopPushName(GLContext *c,TGLParam *p)
|
|||
}
|
||||
}
|
||||
|
||||
void glopPopName(GLContext *c,TGLParam *p)
|
||||
void glopPopName(GLContext *c,TGLParam *)
|
||||
{
|
||||
if (c->render_mode == TGL_SELECT) {
|
||||
assert(c->name_stack_size>0);
|
||||
|
|
|
@ -181,7 +181,7 @@ void glopTexImage2D(GLContext *c,TGLParam *p)
|
|||
|
||||
|
||||
/* TODO: not all tests are done */
|
||||
void glopTexEnv(GLContext *c,TGLParam *p)
|
||||
void glopTexEnv(GLContext *,TGLParam *p)
|
||||
{
|
||||
int target=p[1].i;
|
||||
int pname=p[2].i;
|
||||
|
@ -198,7 +198,7 @@ void glopTexEnv(GLContext *c,TGLParam *p)
|
|||
}
|
||||
|
||||
/* TODO: not all tests are done */
|
||||
void glopTexParameter(GLContext *c,TGLParam *p)
|
||||
void glopTexParameter(GLContext *,TGLParam *p)
|
||||
{
|
||||
int target=p[1].i;
|
||||
int pname=p[2].i;
|
||||
|
@ -217,7 +217,7 @@ void glopTexParameter(GLContext *c,TGLParam *p)
|
|||
}
|
||||
}
|
||||
|
||||
void glopPixelStore(GLContext *c,TGLParam *p)
|
||||
void glopPixelStore(GLContext *,TGLParam *p)
|
||||
{
|
||||
int pname=p[1].i;
|
||||
int param=p[2].i;
|
||||
|
|
|
@ -346,7 +346,7 @@ void glopVertex(GLContext * c, TGLParam * p)
|
|||
c->vertex_n = n;
|
||||
}
|
||||
|
||||
void glopEnd(GLContext * c, TGLParam * param)
|
||||
void glopEnd(GLContext *c, TGLParam *)
|
||||
{
|
||||
assert(c->in_begin == 1);
|
||||
|
||||
|
|
|
@ -50,4 +50,4 @@ V4 gl_V4_New(float x,float y,float z,float w);
|
|||
|
||||
int gl_Matrix_Inv(float *r,float *m,int n);
|
||||
|
||||
#endif __ZMATH__
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue