   Fast Bitmap Loading in DirectDraw
  Hi,i have a problem with loading bitmaps in directdraw.i create a bitmap and a surface.fine.but that takes 800ms. (large bitmap)<code>System.Diagnostics.Stopwatch watch = new System.Diagnostics.Stopwatch();watch.Start();this.m_Surface = new Surface    (this.m_Bitmap,this.m_SurfaceDescription,this.m_Device);watch.Stop();System.Windows.Forms.MessageBox.Show(watch.ElapsedMilliseconds.ToString());now a want to show the next bitmap with the same size in the draw method.is there a possiblity to load the bitmap to the surface without create a new surface?manipulate my created surface?thx a lotMartin   
Quote:Original post by Prybenow a want to show the next bitmap with the same size in the draw method.is there a possiblity to load the bitmap to the surface without create a new surface?manipulate my created surface?You can lock the surface, fill it, and unlock it. I'm not sure how to do that in whatever language you're using (VB? C#?) though.You'll need at least two surfaces, one which is currently being shown, and one which is being loaded into.Also, I'd advise against DirectDraw, it's out of date - Direct3D is the accepted way of doing 2D stuff, unless you're on a platform that can't do D3D for whatever reason. Although it's not going to be any faster...What size and pixel format is the surface?   ;  Hi,i have Bitmaps with 4112x5999 px.i tried to load it with Direct3D but it takes also round about 4 seconds.(just load the bitmap in a memorystream and then use the textureLoader class)my idea was to create a dummy image with the size of 4112x5999 px.and then a copy the data from the new bitmap to ... ??? .... .so a can change the texture/bitmap very fast.but i have no idea how i can do that.i can´t wait 4 seconds or 1 second to load a simple bitmap.thx a lotMartinP.S. i try to build a bitmap viewer control with zoom function.so i thought the gpu can do that for me. (render, ...)i only want to give the gpu the bitmap.;Quote:Original post by PrybeHi,i have Bitmaps with 4112x5999 px.i tried to load it with Direct3D but it takes also round about 4 seconds.(just load the bitmap in a memorystream and then use the textureLoader class)my idea was to create a dummy image with the size of 4112x5999 px.and then a copy the data from the new bitmap to ... ??? .... .so a can change the texture/bitmap very fast.but i have no idea how i can do that.i can´t wait 4 seconds or 1 second to load a simple bitmap.thx a lotMartinP.S. i try to build a bitmap viewer control with zoom function.so i thought the gpu can do that for me. (render, ...)i only want to give the gpu the bitmap.Your "simple" bitmap is over 94MB in size [smile]If your graphics card doesn't have 128MB or more of VRAM, you won't be able to display the texture at all, and you'll need 256MB or more to have two in memory at once.All in all, I think 800ms is very reasonable for loading that much data.   