* 21 July 2000 : cleaned up code from bug hunts, manpage written
* 24 November 2000 : fixed x co-ord calculation in solid - textured
* 05 March 2001 : put back non pnmlib code with #ifdefs
* 21 July 2000 : cleaned up code from bug hunts, manpage written
* 24 November 2000 : fixed x co-ord calculation in solid - textured
* 05 March 2001 : put back non pnmlib code with #ifdefs
int real_height = gflux->modeinfo->xgwa.height;
XImage *ximage = screen_to_ximage (gflux->modeinfo->xgwa.screen,
gflux->window);
int real_height = gflux->modeinfo->xgwa.height;
XImage *ximage = screen_to_ximage (gflux->modeinfo->xgwa.screen,
gflux->window);
if (ximage->width > 1280 || /* that's too damned big... */
ximage->height > 1280)
{
Display *dpy = gflux->modeinfo->dpy;
Visual *v = gflux->modeinfo->xgwa.visual;
if (ximage->width > 1280 || /* that's too damned big... */
ximage->height > 1280)
{
Display *dpy = gflux->modeinfo->dpy;
Visual *v = gflux->modeinfo->xgwa.visual;
int i;
for (i = 0; i < real_height; i++)
{
XPutPixel (ximage, 0, i, gray);
int i;
for (i = 0; i < real_height; i++)
{
XPutPixel (ximage, 0, i, gray);
- XPutPixel (ximage, real_width-1, i, gray);
+ XPutPixel (ximage, width-1, i, gray);
}
for (i = 0; i < real_width; i++)
{
XPutPixel (ximage, i, 0, gray);
}
for (i = 0; i < real_width; i++)
{
XPutPixel (ximage, i, 0, gray);
- XPutPixel (ximage, i, real_height-1, gray);
+ XPutPixel (ximage, i, height-1, gray);
- gflux->tex_xscale = ((GLfloat) real_width / (GLfloat) ximage->width);
- gflux->tex_yscale = ((GLfloat) real_height / (GLfloat) ximage->height);
+ if (bigimage) /* don't scale really large images */
+ {
+ gflux->tex_xscale = 1;
+ gflux->tex_yscale = 1;
+ }
+ else
+ {
+ gflux->tex_xscale = ((GLfloat) real_width / (GLfloat) ximage->width);
+ gflux->tex_yscale = ((GLfloat) real_height / (GLfloat) ximage->height);
+ }