   BSP Lightmap question(Managed DX9)
  I'm trying to convert the bsp tutorials they have out there over to managed dx. I know there is one going out there, but it doesnt support light maps yet. My problem I am having is i believe in this code here. It is drawing the lightmaps, but they are square of equal light so it just looks like blocks of dark or light blended wtih the texture. Can anyone see a problem in this code?I wanted to do it wihtout having to use unsafe, but I cant quite figure out how to do the surfaces properly that way.unsafe  { Rectangle lockedRect = new Rectangle(); int dwCharsPerRow; byte* pSurface; for (int i = 0; i < numLights; i++) {m_pLightMaps = new Texture(m_pDevice, 128, 128, 0, Usage.None, Format.X8R8G8B8, Pool.Managed);Surface pLightmapSurface = m_pLightMaps.GetSurfaceLevel(0);(byte*)pSurface = (byte*)pLightmapSurface.LockRectangle(lockedRect, LockFlags.None, out dwCharsPerRow).InternalData.ToPointer();int counter = 0;for (int r = 0; r < 128; r++){    int dwIndex = r * dwCharsPerRow;    for (int c = 0; c < 128; c++)    {   pSurface[dwIndex + c * 4 + 0] = m_pLightmap.imageBits[counter + 2];   pSurface[dwIndex + c * 4 + 1] = m_pLightmap.imageBits[counter + 1];   pSurface[dwIndex + c * 4 + 2] = m_pLightmap.imageBits[counter];   pSurface[dwIndex + c * 4 + 3] = 255;   counter += 3;    }}pLightmapSurface.UnlockRectangle();TextureLoader.FilterTexture(m_pLightMaps, 0, Filter.Linear); }  }