From: blake <cab...@ea...> - 2004-04-16 12:24:46
|
I would like to use opengl and osmesa for rendering a single, large grayscale image that will then be saved to a file. I downloaded 6.0.1 and installed it. I changed the config.h parameters, max_width, max_height to be 12,000 and 15000 and recompiled. I can now make RGBA images using variations of the example code given in osdemo.c on my RedHat 8.0 system, but I get a 'segmentation violation' for images larger than 9,000 x 11,000. Since I only need 256 colors of gray, I thought I would reduce the memory required by using a OSMESA_COLOR_INDEX rather than RGBA mode, which would then only require a memory allocation of 1 byte for a pixel versus 4 bytes per pixel of RGBA. After changing the context to color_index, however, I found that calling glSetColor gave a segmentation fault. Other variations also failed. I am at a loss as to how to proceed. Is it possible to run a color_index context with osmesa when you are using RedHat8.0 opengl? (I am confused about this-maybe if you are using an RGBA model to run your computer, you can't simultaneously create a color_index picture?) Are there other ways to create a one byte gray level picture using opengl/mesa? (Possibly you can't set the private color map with glSetColor?) Any suggestions on where I might look for clues on solving this problem? thanks Blake |