May 13, 2006
hacking
No Comments
I’m hacking on my Gtk# app in Windows right now, because Visual Studio is amazing. I
couldn’t seem to get pixbufs to load from relative paths, because I couldn’t figure out what the present working directory is on anything in Windows, so I started fooling with the resource manager.
This is a very cool thing. You can put strings or images or whatever you want in there, then access it from your app as Properties.Resources.Foo. Very nice.
However, if you’re using images then they’re obviously stored as a System.Drawing.Bitmap, and Gtk# wants to deal with things as a Gdk.Pixbuf. So here’s a quick snippet of code to deal with that:
using System;
using System.Drawing;
using System.Drawing.Imaging;
public Gdk.Pixbuf CreateFromResource( Bitmap bitmap ) {
BitmapData data = bitmap.LockBits( new Rectangle( 0, 0,
bitmap.Width, bitmap.Height,
PixelFormat.Format24bppRgb );
IntPtr scan = data.Scan0;
int size = bitmap.Width * bitmap.Height * 3;
byte[] bdata = new byte[ size ];
Gdk.Pixbuf pixbuf = null;
unsafe
{
byte* p = (byte*)scan;
for( int i = 0; i |
May 1, 2006
hacking
No Comments
So I started testing out Monodevelop for hacking on my resurrected Ludwig van. It’s pretty nice, I think. Obviously it’s pretty far from Visual Studio, but it’s not bad. The big new thing in the latest release is the integration of stetic, the user interface builder.
Maybe I’m retarded, but I just can’t ever seem to save time by using these UI builders. Glade was okay, but so far I can’t figure out how to use stetic in any remotely useful way. In this respect, I don’t feel that Visual Studio is much further along because its UI builder is pretty useless too. But as I said, maybe I’m just retarded.
February 19, 2006
General
No Comments
So, I’ve installed Xgl and compiz here and the results are really beautiful, although not entirely stable yet. But this is software still in development, so I wasn’t expecting it to be perfect yet. It seems to also be missing support for Xinerama X extension, because now my gdm login screen and my panel stretch across both monitors.
I’ll try to make some videos of the desktop running compiz sometime. It’s really nice looking.
November 18, 2005
music
No Comments
We had a piano quintet performance this morning that didn’t go so well.
Hopefully it’ll be much better next time. It didn’t help that I
couldn’t rehearse with the group all week because of my opera stuff in
Sarasota, but I think there were bigger problems than that. Bartok
concerto is also coming along much better now, and I’m really enjoying
it.
October 5, 2005
hacking
No Comments
A few days ago I started working on a new GObject-based framework for doing general stuff on the GPU. It’s in the very early stages so far, and basically allows render-to-texture and readback of the textures. It’s not very portable yet, in a couple different ways. Right now the test programs require X11, and won’t work on Windows or Mac. That’s pretty minor, is easily fixed, and doesn’t really matter that much anyway. It’s also not very portable between different types of video cards yet, since it depends upon FBOs (and makes use of PBOs if they’re available). And while I was at it, I don’t check for support of rectangular, non-power-of-two textures since any video card that does FBOs and PBOs will also support that. So, basically this code will currently only run on NVIDIA cards.
I’m just now about to start working on the shader support. There are two possible approaches here. The first is to find the best existing shader and use it. The second approach is to have some general data structure describing the shader, select a shader target, and generate the source for it (GLSL, HLSL, ARBvp/ARBfp assemblies, etc) at runtime. This is sort of
what libsh does, although since it’s a C++ template metaprogramming library it generates the source at compile time. The obvious advantage of this approach is that you jump through a few extra hoops to write your shader, and it gets generated into any target you want and you don’t have to write it multiple times. The obvious disadvantage is just that it’s hard to implement, and that it conceivably doesn’t generate the highest-performing shader code. For my purposes, I don’t necessarily need the highest-performing shader code so this isn’t a problem. However, I also don’t care that strongly about the multiple targets. I’d be willing to write one shader a couple times to support different GPUs if necessary (e.g., one shader for SM3.0 and one for everything else). Also, I’d rather go with the easier-to-implement approach so I can have something working sooner rather than later.
This is my first step to World Domination!
September 9, 2005
General
No Comments
Everything is finally getting started here. I’m playing a piano quintet, but we’re not sure which one yet. Either Brahms or Shostakovich. I went out to Sarasota a couple days ago to audition at the Florida West Coast Symphony, and they put me on the sub list. I might also start playing with a couple orchestras around West Palm Beach. So that’s cool.
I’m not usually all that into anime stuff. I liked Cowboy Bebop though, and I got into Inuyasha for awhile. But now I found some newer show called Bleach that’s not out yet in US and I’ve gotten totally addicted to it, pulling down the new episodes from BitTorrent whenever they’re available.
September 9, 2005
hacking
No Comments
I finally got my first engine update in a long while into the cvs server. Hardware occlusion queries are now implemented for Direct3D and for OpenGL. I’ll get a nice looking test program into cvs soon as well.
Right now I’m hacking on support for Xinerama multiscreen displays in Linux so that the device enumeration will be more sensible. Right now it’s detecting my system as a single 3200×1200 display rather than two 1600×1200 displays. One thing that’s really impressive is that I don’t notice much of a performance loss when it’s rendering across two monitors like that. I haven’t tried it in Windows yet, but I know that using Direct3D you’ll instantly get forced into software rendering mode if you use the second monitor (whether you’re spanned across the two monitors or not).
August 20, 2005
General
No Comments
I’ve been setting up a new Scratchbox/Maemo environment on my new Ubuntu partition. I had it setup under Fedora, but I killed my Fedora partition and replaced it with Ubuntu Hoary. I had some problems installing Hoary on this system using the 5.04 ISO, and ended up having to use the previous version, 4.10 Warty, and then upgrade the system to 5.04 Hoary using Synaptic.
Amela came back from Albania recently and had lots of photos, but for some reason couldn’t get the photos off the CD that was given to her. She thought there is a virus on the disc or something, so I took the disc and pulled the images off of it for her. It looked like a fun trip.
Lesley has moved to El Paso. I talked to her before she moved there and she was very excited about it. I keep meaning to call now that she’s been there a couple weeks and find out how it is. She’s teaching violin and viola and helping Ben Loeb get his new chamber orchestra started, as far as I understand. Sounds exciting!
I moved out of Baltimore around the same time Lesley was leaving Santa Barbara, but I haven’t reached my final destination yet. I took a break to hang out in Texas with some friends and family right now. I’m leaving for Florida next week to get back into music more. I’m pretty excited about that. Ralph is teaching here now, and that was what made me interested in going there. So I’ll be preparing for orchestral auditions with Ralph, and doing some chamber music and orchestra stuff there.
I’ve been reading through some chamber music stuff with Amirosh and Kelly a little bit recently, and yesterday we read through a Brahms piano quartet with Elena Tsvetkova. We’re thinking about maybe doing a concert here in December sometime. Amirosh and I are also interested still in trying to do another concert around that time
July 4, 2005
hacking
No Comments
I’ve been fooling around with C# some more. Microsoft sent me a copy of Visual Studio 2005 beta 2 on DVD recently, and I’ve been using Mono on Linux. I’m really interested in getting back to work on some music notation goodness, but this time using a better language. There’s no way I’m going to try to use C. That’s just stupid.
I’m totally cool with using C++, but everyone else I talk to thinks that’s completely insane. I have no interest at all in using Java, and I am wanting to avoid using something like Python as well. I don’t really know why that is. In every other language binding, GTK has really felt like just a “language binding” between C and whatever language it is. For some reason, Gtk# feels more integrated.
March 15, 2005
General
No Comments
Well, I’m back. I went to GDC in San Francisco, and it was pretty cool. I went to a couple of the sessions, walked many miles around the downtown San Francisco area, heard the San Francisco Symphony do Mahler 7, and met shaver, vlad, pavlov, and another Mozilla guy named Brendan. I also managed to get a moment to meet Mark Healy from Lionhead Studios and I saw his demo of Ragdoll Kung-fu in the “experimental gameplay” session. That was really cool. I had been talking with him in email last summer about the possibility of porting that over to Linux and MacOS for him. I’d still like to do that after it’s released, if I can.
Then my company went out to Mammoth ski resort. Fortunately it was only for a couple days. I did try to go skiing, but I didn’t really enjoy it. From there we drove down to Los Angeles and flew out of LAX.
« Previous Entries Next Entries »