|
|
Dan Connelly wrote:
> Nicolas Calimet wrote:
>>> 1. In the preview window black comes up as transparent, so the
>>> underlying
>>> windows are visible. That is of course anoying.
>>
>> Which version of POV-Ray are you using? If 3.6.x, are you talking
>> about
>> the background color of the preview display or any black pixel in the
>> rendered
>> image?
>
> I have the same issue: the preview display is OR'ed with background pixels.
>
> preview on black: okay
> preview on white: invisible
>
> Dan
I managed to kluge a fix to this by suppressing alpha values in the SetPixel and
SetPixelScaled routines. I'm not sure why one would want to write alpha to the X
display.
These diffs are to the 3.7 beta 28 code.
% diff -c disp_sdl.cpp*
*** disp_sdl.cpp Tue Sep 30 18:25:52 2008
--- disp_sdl.cpp~ Mon Aug 4 09:11:02 2008
***************
*** 298,306 ****
{
Uint8 *p = (Uint8 *) m_display->pixels + y * m_display->pitch + x *
m_display->format->BytesPerPixel;
! // Uint32 sdl_col = SDL_MapRGBA(m_display->format, colour.red, colour.green,
colour.blue, colour.alpha);
! // djconnel: 30 Sep 2008:
! Uint32 sdl_col = SDL_MapRGBA(m_display->format, colour.red, colour.green,
colour.blue, (unsigned char) 0);
switch (m_display->format->BytesPerPixel)
{
--- 298,304 ----
{
Uint8 *p = (Uint8 *) m_display->pixels + y * m_display->pitch + x *
m_display->format->BytesPerPixel;
! Uint32 sdl_col = SDL_MapRGBA(m_display->format, colour.red, colour.green,
colour.blue, colour.alpha);
switch (m_display->format->BytesPerPixel)
{
***************
*** 346,354 ****
r = (r*m_PxCount[ofs] + colour.red ) / (m_PxCount[ofs]+1);
g = (g*m_PxCount[ofs] + colour.green) / (m_PxCount[ofs]+1);
b = (b*m_PxCount[ofs] + colour.blue ) / (m_PxCount[ofs]+1);
! // djconnel: 30 Sep 2008
! //a = (a*m_PxCount[ofs] + colour.alpha) / (m_PxCount[ofs]+1);
! a = 0;
Uint32 sdl_col = SDL_MapRGBA(m_display->format, r, g, b, a);
--- 344,350 ----
r = (r*m_PxCount[ofs] + colour.red ) / (m_PxCount[ofs]+1);
g = (g*m_PxCount[ofs] + colour.green) / (m_PxCount[ofs]+1);
b = (b*m_PxCount[ofs] + colour.blue ) / (m_PxCount[ofs]+1);
! a = (a*m_PxCount[ofs] + colour.alpha) / (m_PxCount[ofs]+1);
Uint32 sdl_col = SDL_MapRGBA(m_display->format, r, g, b, a);
Post a reply to this message
|
|