I want to take an already created LPDIRECTDRAWSURFACE7 pointer and copy it's info to a texture map. Both the original surface and the new texture map are 64x64.
I define the texture surface as follows (I copied most of this from the DX7 help):
// previously defined
LPDIRECTDRAWSURFACE OriginalSurface;
LPDIRECTDRAWSURFACE7 TextureSurface;
DDSD ddsd;
memset(&ddsd, 0, sizeof(ddsd));
ddsd.dwSize=sizeof(ddsd);
ddsd.dwFlags = DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH | DDSD_TEXTURESTAGE;
ddsd.dwWidth=64;
ddsd.dwHeight=64;
ddsd.ddsCaps.dwCaps = DDSCAPS_TEXTURE;
ddsd.ddsCaps.dwCaps2=DDSCAPS2_TEXTUREMANAGE;
lpdd7->CreateSurface(&ddsd, &TextureSurface, NULL);
NOW, I have tried two techniques to put a bitmap on the new surface, both of which didn't work:
1) lpD3Ddevice->Load(TextureSurface, NULL,OriginalSurface, NULL, 0);
// I had the LPD3DDEVICE7 lpD3Ddevice already // defined
2) TextureSurface->Blt(NULL, OriginalSurface, NULL, DDBLT_KEYSRC|DDBLT_WAIT, NULL);
Then later in the main game loop, I try to Blt the TextureSurface to the BackBuffer, however, it doesn't work:
lpddsback->Blt(&DestRect, TextureSurface, NULL, DDBLT_KEYSRC | DDBLT_WAIT, NULL);
So, now that you all have this wonder information, does anyone see what is wrong?
Am I defining a texture surface wrong? Is there a specific way to Blt to a texture surface? Do I have no idea what I am doing?
Thanks in advance,
Briar LoDeran