Jason (jcreed) wrote,

Fighting generalized bitrot today again by seeing if I could get sketchup working on my desktop machine. This is in principle harder than getting fontforge working again because (a) it's not open-source, and (b) there is no linux version at all.

So I tried running it under wine. Somewhat impressively, it worked, and pretty acceptably fast, even though I have no hardware GL acceleration on this machine under linux.

...except around every cursor there is an ugly white box, obscuring what you are trying to work on.

Obviously then I dug into the wine source and determined that the following patch suffices to fix the problem:
*** wine-1.1.33/dlls/winex11.drv/mouse.c
--- wine-1.1.33/dlls/winex11.drv/mouse.c
*** 518,527 ****
                  case 32:
                      /* BGRA, 8 bits each */
!                     *pixel_ptr = *xor_ptr++;
!                     *pixel_ptr |= *xor_ptr++ << 8;
!                     *pixel_ptr |= *xor_ptr++ << 16;
!                     *pixel_ptr |= *xor_ptr++ << 24;

                  case 24:
--- 521,540 ----
                  case 32:
                      /* BGRA, 8 bits each */
!                 {
!                 char red = *xor_ptr++;
!                 char green = *xor_ptr++;
!                 char blue = *xor_ptr++;
!                 char alpha = *xor_ptr++;
!                 if (alpha == 0 && !alpha_zero) {
!                   red = 0;
!                   green = 0;
!                   blue = 0;
!                 }
!                 *pixel_ptr = (alpha << 24) + (blue << 16) + (green << 8) + red;
!                 }

                  case 24:

though I'm still slightly confused which piece of software is to blame for the problem. It seems like the Xcursor library thinks that "white with alpha 0x00" means "ha ha just kidding completely opaque white" and so what the patch is doing is just forcibly rewriting "transparent white" to "transparent black" which Xcursor will honor as transparent. But I have this sneaking suspicion that maybe a "add brightness" or "screen" sort of transfer mode got invoked somewhere, as that would explain some of the other mysterious experimental results I got on fully transparent colors other than white.

Oh, and the other broken thing is COLLADA export. It spews some errors at me about XML libraries not being found, and hell if I know how to fix that on the windows-side of things. In the meantime I found a Ruby script to be run inside sketchup itself which seems to export DXF okay, but I tried getting Blender to import it and it just choked and gave me silent failcess.


Turns out: blender just doesn't accept DXF files without a proper header. Easy enough to add that.
Tags: sketchup

  • (no subject)

    Some further progress cleaning up the https://xkcd.com/1360/ -esque augean stables that is my hard drive. Tomato chicken I made a couple days ago…

  • (no subject)

    Did some personal archaeology. Helped a little with laundry. Threw some chicken, onions, tomato, stock, peppers in the slow cooker and hopefully…

  • (no subject)

    Dinner with akiva and dannel at nuevo portal in carroll gardens. Ate a pile of chicken stew and rice and beans and maduros, good times. I do miss…

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded