#### Archived

This topic is now archived and is closed to further replies.

## Recommended Posts

BenB    122
Hey, I''m curenntly using the "utils.cpp" supllied with the SDK, but I need to load quite a lot bitmaps. With the functions provided, I can only load one bitmap into a surfcae: *lpDDSurface = Utils_LoadBitmap(G.lpDD, szFileName, 0, 0); So the question is, of course, how can load multiple bitmaps into one surface? Thanks a lot...

##### Share on other sites
You will have to make on really big surface, then load each bitmap separately and blit them to that surface separately to different areas on the surface.

Basically:
  LPDDSURFACEDESC7 target;LPDDSURFACEDESC7 temp;temp=LoadBitmap(bitmap1);target->Blt(topleft,temp,...,...);temp=LoadBitmap(bitmap2);target->Blt(topright,temp,...,...);temp=LoadBitmap(bitmap3);target->Blt(bottomleft,temp,...,...);temp=LoadBitmap(bitmap4);target->Blt(bottomright,temp,...,...);

---
Make it work.
Make it right.
Make it fast.

##### Share on other sites
xyzzy00    307
Or.. just create your big texture, and then call D3DXLoadSurfaceFromSurface for each image you want to load, each time giving a different destination subrect.

xyzzy