I'm using a surface to render my cursor and I obviously want transparency. Here's my loading code:
Quote: Cursor_Background = device.CreateOffscreenPlainSurface(100, 40, Manager.Adapters[0].CurrentDisplayMode.Format, Pool.Default);
SurfaceLoader.FromFile(Cursor_Background, "cursor.bmp", Filter.None, Color.White.ToArgb());
My rendering function:
Quote: public void DrawCursor()
{
Surface backbuffer = device.GetBackBuffer(0, 0, BackBufferType.Mono);
device.StretchRectangle(Cursor_Background, new Rectangle(0, 0, 16, 17), backbuffer,
new Rectangle(mouse_x, mouse_y, 16, 17),
TextureFilter.None);
backbuffer.Dispose();
}
As you can see I want white to be transparent. Every tutorial I've found on this uses something called a ColorKey, which doesn't exist in my project or Surface class so I'm guessing its a DirectDraw version of the class. Any help or suggestions would be great, thanks!