[GRASS5] NVIZ image dump broken?

Glynn Clements glynn at gclements.plus.com
Wed May 3 16:40:42 EDT 2006


Bob Covill wrote:

> I took a look at the thread below and it appears that the image is being
> read incorrectly on 64 bit machines. The image buffer is created from
> gsd_getimage in gsd_prim.c in ogsf. Unfortunately, I am not an expert on
> 64 bit machines, but I would guess that that either the malloc is wrong
> or glReadPixels is wrong. Is an "unsigned long" a different size on 64
> bit architecture?

Very probably; I would expect long to be 64 bits on a 64-bit system.

If you need a 32-bit type, either use uint32_t from <stdint.h> (C99,
but present on most systems) or use AC_CHECK_SIZEOF in configure.in.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list