From: Brian P. <bri...@tu...> - 2004-08-20 19:21:39
|
Joseph Triscari wrote: > Hello, > > I am trying use osmesa to generate some rendered imagery in a batch > mode. I am generating the images with shadows on variable surfaces using > the shadow volume method which requires several bits in the stencil > buffer. I would also like to generate 16 bit images. I have found that > when I compile and use the 16 bit library (make target is > linux-osmesa16-static), the context generates a 1 bit stencil buffer > (instead of 8). I have tried using OSMesaCreateContextExt to set the > stencil buffer to 8 bits but that does not work either. > > Is it possible to generate 16 bit color channel images and still > have an 8 bit stencil buffer and a 16 bit depth buffer? Is there some > set of commands I should have used? Below is the chunk of code that sets > up my context. Any help is very much appreciated. > > > Joe > > OSMesaCreateContext ctx = OSMesaCreateContextExt(GL_RGBA, 16, 8, 0, NULL); > OSMakeCurrent(ctx, buffer, GL_UNSIGNED_SHORT, xsize, ysize); > glGetIntegerv(GL_STENCIL_BITS, &bits); > if (bits < 8) <Exit with error> This should work. Probably a glitch somewhere. I'll look into it later or over the weekend. -Brian |