Brian Paul wrote:
Karl Schultz has been doing the Windows maintenance.
> What about using alpha_flag in WMesaCreateContext ?
Can you be more specific?
Well, if we set alpha_flag in WMesaCreateContext then we have assert at
_mesa_add_alpha_renderbuffers due to fact that we have no frontLeft
buffer, but _mesa_add_soft_renderbuffers say that we have
===============8<========================
_mesa_add_soft_renderbuffers(c->gl_buffer,
GL_FALSE, /* color */
c->gl_visual->depthBits > 0,
c->gl_visual->stencilBits > 0,
c->gl_visual->accumRedBits > 0,
alpha_flag,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
GL_FALSE);
/* rendebuffer.c */
void
_mesa_add_soft_renderbuffers(struct gl_framebuffer *fb,
GLboolean color,
GLboolean depth,
GLboolean stencil,
GLboolean accum,
GLboolean alpha,
GLboolean aux)
{
GLboolean frontLeft = GL_TRUE;
^^^^^^^^^^^^^^^^^^^^^^^^^
......
if (alpha) {
assert(fb->Visual.rgbMode);
assert(fb->Visual.alphaBits > 0);
_mesa_add_alpha_renderbuffers(NULL, fb, fb->Visual.alphaBits,
frontLeft, backLeft,
frontRight, backRight);
}
......
GLboolean
_mesa_add_alpha_renderbuffers(GLcontext *ctx, struct gl_framebuffer *fb,
GLuint alphaBits,
GLboolean frontLeft, GLboolean backLeft,
GLboolean frontRight, GLboolean backRight)
{
....
/* Wrap each of the RGB color buffers with an alpha renderbuffer.
*/
for (b = BUFFER_FRONT_LEFT; b <= BUFFER_BACK_RIGHT; b++) {
struct gl_renderbuffer *arb;
if (b == BUFFER_FRONT_LEFT && !frontLeft)
continue;
else if (b == BUFFER_BACK_LEFT && !backLeft)
continue;
else if (b == BUFFER_FRONT_RIGHT && !frontRight)
continue;
else if (b == BUFFER_BACK_RIGHT && !backRight)
continue;
/* the RGB buffer to wrap must already exist!! */
assert(fb->Attachment[b].Renderbuffer);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
===============8<========================
On the other hand, osmesa driver has GL_FALSE for alpha
_mesa_add_soft_renderbuffers(osmesa->gl_buffer,
GL_FALSE, /* color */
osmesa->gl_visual->haveDepthBuffer,
osmesa->gl_visual->haveStencilBuffer,
osmesa->gl_visual->haveAccumBuffer,
GL_FALSE, /* alpha */
GL_FALSE /* aux */ );
So I am a bit confused with alpha.
My idea is to use gDlib library to save images as from double buffer
(well, backLeft buffer) as well as from osmesa's buffer to png that
also have alpha.
SY,
EK
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev