#include <string.h>
#include <stdio.h>
#include <stdlib.h>
-#include <malloc.h>
#include <GL/gl.h>
#include <GL/glu.h>
#ifdef HAVE_GLE3
static argtype vars[] = {
- {(caddr_t *) &do_light, "light", "Light", DEF_LIGHT, t_Bool},
- {(caddr_t *) &do_wire, "wire", "Wire", DEF_WIRE, t_Bool},
- {(caddr_t *) &do_texture, "texture", "Texture", DEF_TEXTURE, t_Bool},
- {(caddr_t *) &do_texture_quality, "texture_quality", "Texture_Quality", DEF_TEXTURE_QUALITY, t_Bool},
- {(caddr_t *) &do_mipmap, "mipmap", "Mipmap", DEF_MIPMAP, t_Bool},
- {(caddr_t *) &which_name, "name", "Name", DEF_NAME, t_String},
- {(caddr_t *) &which_image, "image", "Image", DEF_IMAGE, t_String},
+ {&do_light, "light", "Light", DEF_LIGHT, t_Bool},
+ {&do_wire, "wire", "Wire", DEF_WIRE, t_Bool},
+ {&do_texture, "texture", "Texture", DEF_TEXTURE, t_Bool},
+ {&do_texture_quality, "texture_quality", "Texture_Quality", DEF_TEXTURE_QUALITY, t_Bool},
+ {&do_mipmap, "mipmap", "Mipmap", DEF_MIPMAP, t_Bool},
+ {&which_name, "name", "Name", DEF_NAME, t_String},
+ {&which_image, "image", "Image", DEF_IMAGE, t_String},
};
{
XImage *ximage = xpm_file_to_ximage (MI_DISPLAY (mi), MI_VISUAL (mi),
MI_COLORMAP (mi), filename);
- image = ximage->data;
+ image = (GLubyte *) ximage->data;
width = ximage->width;
height = ximage->height;
format = GL_RGBA;
GL_UNSIGNED_BYTE, image);
if (status)
{
- const char *s = gluErrorString (status);
+ const char *s = (char *) gluErrorString (status);
fprintf (stderr, "%s: error mipmapping %dx%d texture: %s\n",
progname, width, height,
(s ? s : "(unknown)"));