#pragma region CPL License /* Nuclex Engine Copyright (C) 2002-2008 Nuclex Development Labs This library is free software; you can redistribute it and/or modify it under the terms of the IBM Common Public License as published by the IBM Corporation; either version 1.0 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the IBM Common Public License for more details. You should have received a copy of the IBM Common Public License along with this library */ #pragma endregion #ifndef NUCLEX_PLUGINS_CORONA_CORONAPLUGIN_H #define NUCLEX_PLUGINS_CORONA_CORONAPLUGIN_H #include "Nuclex/Nuclex.h" //#include "MemoryTracker/DisableMemoryTracker.h" #include //#include "MemoryTracker/MemoryTracker.h" #include "Nuclex/Video/Surface.h" // The following block will decide whether symbols are imported from a // dll (client app) or exported to a dll (nuclex library). // The CORONAPLUGIN_EXPORTS symbol should only be used for compiling // the Nuclex.Plugins.Corona library and nowhere else. // #ifdef CORONAPLUGIN_EXPORTS #define CORONAPLUGIN_API __declspec(dllexport) #else #define CORONAPLUGIN_API __declspec(dllimport) #endif namespace Nuclex { namespace Video { // ------------------------------------------------------------------------------------------- // /// /// Converts a corona pixel format into the corresponding nuclex pixel format /// /// Corona pixel format that will be converted /// The matching nuclex pixel format inline Video::Surface::PixelFormat PixelFormatFromCoronaPixelFormat( corona::PixelFormat eFormat ) { switch(eFormat) { case corona::PF_R8G8B8A8: return Video::Surface::PF_ARGB_8_8_8_8; case corona::PF_R8G8B8: return Video::Surface::PF_RGB_8_8_8; case corona::PF_I8: return Video::Surface::PF_RGB_3_3_2; //case corona::PF_B8G8R8A8: return Surface::PixelFormat::PF_ARGB_8_8_8_8; //case corona::PF_B8G8R8: return Surface::PixelFormat::PF_RGB_8_8_8; default: return Video::Surface::PF_NONE; } } // ------------------------------------------------------------------------------------------- // }} // namespace Nuclex::VIDEO #endif // NUCLEX_PLUGINS_CORONA_CORONAPLUGIN_H