SendToGPU Advanced function Note that since OpenLayer 1.9 this function won't do anything unless Settings::StoreMemoryBitmaps is turned on or the Bitmap was unloaded from the video card by calling UnloadToMemory! (An error will be logged to allegro.log if this function is used without having a memory bitmap storage)
Sends the Bitmap to the graphics card. Automatically done by the loading functions. If you wish to have more control of when the bitmap should reside in the gfx card you can use SendToGPU and UnloadFromGPU for that. OpenLayer handles uploading and destroying textures for you so you don't usually need to call this function. Examples // Turn on the memory bitmap storage //
Settings::StoreMemoryBitmaps( true ); // The Bitmap will automatically be uploaded to the graphics card // Bitmap myBmp( ... ); // ... but we unload it // myBmp.UnloadFromGPU(); // Send the bitmap to the graphics card // myBmp.SendToGPU(); Other functions of the class Bitmap
Questions about SendToGPU? Click here. |